react-native-cache:在AsyncStorage之上构建本机LRU缓存

时间:2021-05-02 15:57:54
【文件属性】:
文件名称:react-native-cache:在AsyncStorage之上构建本机LRU缓存
文件大小:63KB
文件格式:ZIP
更新时间:2021-05-02 15:57:54
TypeScript React本机缓存 基于 (或随附的MemoryStore)构建的LRU缓存,并自动修剪最近最少使用的项目。 安装 运行以下命令。 npm install --save react-native-cache 导入库。 import { Cache } from "react-native-cache" ; 用法 您可以使用以下方法初始化缓存。 const cache = new Cache ( { namespace : "myapp" , policy : { maxEntries : 50000 , // if unspecified, it can have unlimited entries stdTTL : 0 // the standard ttl as number in seconds, default: 0 (unl
【文件预览】:
react-native-cache-master
----package.json(1KB)
----tslint.json(375B)
----jest.config.js(69B)
----package-lock.json(253KB)
----src()
--------memoryStore.ts(823B)
--------cache.test.ts(2KB)
--------cache.ts(5KB)
--------index.ts(102B)
----tsconfig.json(6KB)
----.gitignore(22B)
----README.md(2KB)

网友评论