【文件属性】:
文件名称:tabby-cache-manager
文件大小:2KB
文件格式:ZIP
更新时间:2021-03-16 21:13:03
JavaScript
虎斑缓存
实际有效的最小缓存库。 37行代码, 0依赖项。
安装
当前稳定版本: 1.x
$ npm install tabby-cache
用法
const TabbyCache = require ( 'tabby-cache' ) ;
const cache = new TabbyCache ( 60 ) ; // in seconds
const obj = 'object' ; // string, number, boolean, object, array
cache . set ( obj , 'cache-key' ) ; // set the cache
// cache that exists
cache . get ( 'cache-key' ) ; // return obj
// cache that doesn't exists or after timeo
【文件预览】:
tabby-cache-manager-master
----README.md(992B)
----index.js(999B)
----package.json(437B)