3.0.2 • Published 5 years ago

@maxdome/redis v3.0.2

Weekly downloads
-
License
-
Repository
-
Last release
5 years ago

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');
3.0.2

5 years ago

3.0.1

6 years ago

3.0.0

6 years ago

2.0.1

6 years ago

2.0.0

7 years ago

1.0.5

7 years ago