Implement clearing caches in settings

This commit is contained in:
tusooa 2024-08-23 00:31:03 -04:00
commit e21bac3d70
No known key found for this signature in database
GPG key ID: 42AEC43D48433C51
5 changed files with 50 additions and 4 deletions

View file

@ -147,4 +147,10 @@ export function unregisterPushNotifications (token) {
}
}
export const shouldCache = process.env.NODE_ENV === 'production'
export const cacheKey = 'pleroma-fe'
export const emojiCacheKey = 'pleroma-fe-emoji'
export const clearCache = (key) => caches.delete(key)
export { getOrCreateServiceWorker }