1.0.3 • Published 3 years ago

cacheman-redis-promised v1.0.3

Weekly downloads
56
License
ISC
Repository
github
Last release
3 years ago

cacheman-redis-promised

Basically an extension of cacheman-redis module that uses promises.

Instalation

$ npm install cacheman-redis-promised

Usage

const cache = require('cacheman-redis-promised')({host: '127.0.0.1', port: 6379})

or

const cache = require('cacheman-redis-promised')('redis://.....')
cache.set('some key', 'hello there').then(function(data) {
	console.log(data); // -> 'hello there'
	return cache.get('some key');
}).then(function(data) {
	console.log(data); // -> 'hello there' from cache.get
	return cache.del('some key');
}).then(function() {
	console.log('value deleted');
});
1.0.3

3 years ago

1.0.2

4 years ago