Skip to content

toomeefed/maybe-store-redis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

maybe-store-redis

Redis storage adapter for maybe-store

Travis Coverage Status David npm (scoped) node (scoped) GitHub license

安装

$ yarn add @toomee/maybe-store-redis redis # 推荐
# 或者
$ npm i -S @toomee/maybe-store-redis redis

使用

const MaybeStore = require('@toomee/maybe-store');
const MaybeStoreRedis = require('@toomee/maybe-store-redis');

const store = new MaybeStore({
  store: new MaybeStoreRedis(),
});

await store.set('foo', 'expires in 1 second', 1000); // true
await store.set('foo', 'never expires'); // true
await store.get('foo'); // 'never expires'
await store.delete('foo'); // true
await store.clear(); // undefined

License

MIT

About

Redis storage adapter for maybe-store

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published