1.0.0 • Published 3 years ago

@yangshuanlin/y-cache v1.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

加密缓存处理

基于localstorage的加密缓存处理

使用示例

import Cache from '@/utils/cache'
// 存
Cache.set('name', 'dddd')
// 取
console.log(Cache.get('name'))
// 删除
Cache.del('name')
// 分组 
Cache.tag('dd').set('sss', 'ddd')
console.log(Cache.get('sss'))

// 清理组内所有
Cache.clear('dd')
console.log(Cache.get('sss'))

// 清理站点所有localStorage,谨慎使用
Cache::clearAll()

license

MIT