@random-guys/memory
v0.2.1
Published
Wrapper around redis
Downloads
5
Readme
memory
Wrapper around redis.
How to install?
yarn install @random-guys/memory
How does it work?
const store = new RedisStore(redisUrl)
// save data for 10m
await redis.save('something', 'some that things...hehe..fool', 60 * 10);
// save an object
await redis.save('myobject', {
tomatoes: 'tomaetoes',
biscuit: 'bone'
})
// get a normal string
await redis.get('something')
// get an object
await redis.get('myobject', true)
// clean the table
await redis.delete('myobject')
await redis.delete('something')