Skip to content

PizerLiu/await-redis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 

Repository files navigation

await-redis

promise封装的redis

//key 键,value 值,expire (过期时间,单位秒;可为空,为空表示不过期) -> 添加string类型的数据

await redisSet(key, value, expire)

//key 键 -> 查询string类型的数据

await redisGet(key)

//key 键 -> 查询key是否存在

await redisExists(key)

//随机返回一个键

await redisRandomkey()

//HashName 名,key 键 -> 查询哈希中的key

await redisHmget(HashName,key)

//HashName 名 -> 查询哈希中的所有键值对

await redisHgetall(HashName)

//HashName 名, 键值对(object类型) -> 存储哈希键值对

await redisHmset(HashName,info)

About

promise封装的redis,方便同步调用,减少回调

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published