Files
SQLBot/frontend/src/utils/useCache.ts
T
2025-06-12 12:09:30 +08:00

14 lines
277 B
TypeScript

import WebStorageCache from 'web-storage-cache'
type CacheType = 'sessionStorage' | 'localStorage'
export const useCache = (type: CacheType = 'localStorage') => {
const wsCache: WebStorageCache = new WebStorageCache({
storage: type,
})
return {
wsCache,
}
}