1.0.3 • Published 6 months ago

@chenzoho/cache v1.0.3

Weekly downloads
-
License
MIT
Repository
-
Last release
6 months ago

缓存组件

安装

pnpm i xe-utils
pnpm i @chenzoho/crypto
pnpm i @chenzoho/cache

注册

import { setupCache,toggleCache } from "@chenzoho/cache"

setupCache(/** prefixKey */,/**timeout */,/**local */,/**hasEncrypt */)

使用

import { persist } from "@chenzoho/cache"

// 内存
persist.memoryStorage.get(/** key */)

// 本地
persist.lsStorage.get(/** key */)

// 会话
persist.ssStorage.get(/** key */)

// 混合
persist.mixinStorage.get(/** key */)

// 本地内存混合
persist.lsMixin.get(/** key */)

// 本地会话混合
persist.ssMixin.get(/** key */)

更新

  • 1.0.0
    • 初始版本
  • 1.0.1
    • 增加
      • 是否加密的选项
    • 移除
      • 切换的方法toggleCache
  • 1.0.2
    • 移除
      • src文件夹
    • 修复
      • README.md
1.0.3

6 months ago

1.0.2

6 months ago

1.0.1

6 months ago

1.0.0

6 months ago