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
MIT