Repository URL to install this package:
|
Version:
4.0.5 ▾
|
import { config } from '../config'
import { toKeys } from './toKeys'
import { expire } from './expire'
export const clear = (forceResetAll: boolean = true) => {
// const cache = config.get('cache')
const cache = {}
toKeys().forEach(key => {
expire(key)
// delete cache[key]
})
config.set('cache', cache)
if (forceResetAll === true) {
config.get('document').cookie = ''
}
}