pusher-ps-cache
v1.0.10
Published
An implementation of ps-cache module, pubsub caching library, using pusher.com real-time messaging medium.
Downloads
16
Readme
pusher-ps-cache
An implementation of ps-cache, pubsub caching library, using pusher.com real-time messaging medium.
Features
- Local in memory caching
- Real-time cache invalidation
Getting Started
var pscache = require('ps-cache');
var cache = new pscache.Cache();
//Pusher configuration
var listenerOpts = {
cache: cache,
app_id: ...,
key: ...,
secret: ...,
cluster: ...,
channel: ...
};
//Create pusher listener
var pusherListener = new pusherBaseListener.PusherListener(listenerOpts);
cache.attachListener(pusherListener);
//Set to cache
cache.set(key, value);
//Get value by key or null if key doesn't exists
cache.get(key);
//Remove from local cache and notify for global invalidation
cache.remove(key)
Requirements
Node.js >= 6.0
Installation
With npm do:
npm install pusher-ps-cache -save
About
This project is funded and maintained by Mobiltron, Inc.. We :heart: open source software!
Check out our other open source projects or say :wave: on twitter @mobiltron.
Contribute
Contributions are welcome :metal: We encourage developers like you to help us improve the projects we've shared with the community. Please see the Contributing Guide and the Code of Conduct.
Authors
- Vassilios Karakoidas - Initial work - Mobiltron, Inc.
- Stavros Schizas - Supporting work - Mobiltron, Inc.
See also the list of contributors who participated in this project.
License
pusher-ps-cache is available under the MIT license. See the LICENSE file for more info.