2023-07-26 22:31:52 -07:00
|
|
|
/*
|
|
|
|
* SPDX-FileCopyrightText: syuilo and other misskey contributors
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
*/
|
|
|
|
|
2023-09-03 21:33:38 -07:00
|
|
|
import * as Misskey from 'misskey-js';
|
2023-03-24 00:54:37 -07:00
|
|
|
import { Cache } from '@/scripts/cache';
|
2023-09-10 22:55:18 -07:00
|
|
|
import { api } from '@/os';
|
2023-03-24 00:54:37 -07:00
|
|
|
|
2023-09-10 22:55:18 -07:00
|
|
|
export const clipsCache = new Cache<Misskey.entities.Clip[]>(1000 * 60 * 30, () => api('clips/list'));
|
|
|
|
export const rolesCache = new Cache(1000 * 60 * 30, () => api('admin/roles/list'));
|
|
|
|
export const userListsCache = new Cache<Misskey.entities.UserList[]>(1000 * 60 * 30, () => api('users/lists/list'));
|
|
|
|
export const antennasCache = new Cache<Misskey.entities.Antenna[]>(1000 * 60 * 30, () => api('antennas/list'));
|