@maxdome/redis

3.0.2 • Public • Published

Usage

const redis = require('@maxdome/redis')(process.env.REDIS_URL);

await redis.setJSON('key', 'value', 1 * 60 * 60);
const value = await redis.getJSON('key');

If the expire is an object supporting asSeconds() (e.g. @maxdome/duration or moment.duration) it will be used.

const duration = require('@maxdome/duration');
const redis = require('@maxdome/redis')(process.env.REDIS_URL);

await redis.setJSON('key', 'value', duration('1h'));
const value = await redis.getJSON('key');

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 3.0.2
    2
    • latest

Version History

Package Sidebar

Install

npm i @maxdome/redis

Weekly Downloads

0

Version

3.0.2

License

none

Unpacked Size

2.68 kB

Total Files

4

Last publish

Collaborators

  • dragonnodejs
  • sharaal
  • fabsrc
  • markusz
  • mxdbv
  • csaba.lorincz
  • goexrock
  • dimified