perf: set cache default time

This commit is contained in:
vben
2020-10-27 22:53:31 +08:00
parent b350098f44
commit c620f8279f
4 changed files with 16 additions and 6 deletions

View File

@@ -6,10 +6,15 @@ import { BASE_LOCAL_CACHE_KEY, BASE_SESSION_CACHE_KEY } from '/@/enums/cacheEnum
const ls = createStorage(localStorage);
const ss = createStorage();
interface CacheStore {
local?: any;
session?: any;
}
/**
* @description: Persistent cache
*/
const cacheStore: any = {
const cacheStore: CacheStore = {
// localstorage cache
local: {},
// sessionstorage cache