nedis-cache
v1.0.3
Published
Mimic the memory cache of the Redis API,类redisapi的内存缓存
Downloads
3
Maintainers
Readme
Mimic the memory cache of the Redis API
Implemented part
kv
set get del dump exists expire persist randomkey append decr incr getrange strlen setrange ttl mget getset
hash (Part)
hmset hgetall hexists hget hdel hmget hkeys hvals hlen
set (Part)
sadd scard srem spop
example
const nedis = require('../app');
// new
let cache = new nedis.cache();
//simple
nedis.kv.set("a","a")
nedis.kv.get("a")
//ttl
nedis.kv.set("a","a",1000)
//ttl callback
nedis.kv.set("a","a",1000,function(){
//....
})
//or apis
document
todo
- buffer memory
- sorted set