hippofish/packages/frontend/src/scripts/clear-cache.ts
かっこかり d20542c495
enhance: metaをSSR HTMLに埋め込む (#13436)
* enhance: `meta`をSSR HTMLに埋め込む

* HTML Metaの有効時間を指定

* 1時間

* MetaEntityService

* JSONをPackするように

* ✌️

---------

Co-authored-by: syuilo <4439005+syuilo@users.noreply.github.com>
2024-02-23 10:47:17 +09:00

19 lines
675 B
TypeScript

import { unisonReload } from '@/scripts/unison-reload.js';
import * as os from '@/os.js';
import { miLocalStorage } from '@/local-storage.js';
import { fetchCustomEmojis } from '@/custom-emojis.js';
import { fetchInstance } from '@/instance.js';
export async function clearCache() {
os.waiting();
miLocalStorage.removeItem('instance');
miLocalStorage.removeItem('instanceCachedAt');
miLocalStorage.removeItem('locale');
miLocalStorage.removeItem('localeVersion');
miLocalStorage.removeItem('theme');
miLocalStorage.removeItem('emojis');
miLocalStorage.removeItem('lastEmojisFetchedAt');
await fetchInstance(true);
await fetchCustomEmojis(true);
unisonReload();
}