This commit is contained in:
2025-09-08 16:37:42 +08:00
parent 2cd8222ab6
commit a22065cb53

View File

@@ -0,0 +1,13 @@
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,
}
}