@toomee/maybe-store-redis
v1.1.0
Published
Redis storage adapter for maybe-store
Downloads
6
Readme
maybe-store-redis
Redis storage adapter for maybe-store
安装
$ 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