cache_star
v1.0.18
Published
Local memory Cache and Redis binder
Readme
Cache Star
Cache Star is a Redis - In memory simple binder, using under the hood Redis pub-sub methods and lazy loads to in memory object, return promises.
Installation
Cache Star requires Node.js v6+ to run. Install the dependencies and devDependencies and start the server.
$ npm install cache_star --saveUsage Examples
In your node app
let cacheStar = require(‘cache_star’);
let redisConObj = { port: 'myRedisPort', host: 'myRedisHost', password: 'myRedisPass' };
let cachStarManger = new cacheStar(redisConObj);
cachStarManger.get(‘myRedisHash’, ‘myRedisHashKey’).then((hashVal) => {
// do something
});
cachStarManger.set(‘myRedisHash’, ‘myRedisHashKey’, objToSave).then((ans) => {
// do something
});
cachStarManger.del(‘myRedisHash’, ‘myRedisHashKey’).then((hashVal) => {
// do something
});Supports:
currently support 4 redis methods
- get
- getAll
- set
- del
Tech
Cache Star uses a number of open source projects to work properly:
- [Node_Redis] - redis client for node.
- [Bluebird] - Bluebird is a full featured promise library with unmatched performance.
