cache-manager-hazelcast
v0.2.1
Published
Node Cache Manager for Hazelcast
Downloads
14
Readme
Node Cache Manager store for Hazelcast
A Hazelcast store for the node-cache-manager module.
Installation
npm install --save cache-manager-hazelcast
Usage examples
var cacheManager = require('cache-manager');
var hazelcastStore = require('cache-manager-hazelcast');
var hazelcastCache = cacheManager.caching({
store: hazelcastStore,
defaultMap: 'CACHE' // Default Value is 'CACHE'
host: 'localhost',
port: 5701,
prefix: 'MapPrefix',
ttl: 60,
});
hazelcastCache.set('foo', 'bar', {
mapName: 'CustomMapName',
ttl: 120,
}); // returns Promise
hazelcastCache.get('foo', {
mapName: 'CustomMapName',
}) // returns Promise
hazelcastCache.del('foo', {
mapName: 'CustomMapName',
}) // returns Promise
API
constructor Options
{
defaultMap?: string,
host?: string,
port?: string,
prefix?: string,
ttl?: number,
}
General Options
{
mapName?: string,
}
Set options
{
mapName?: string,
ttl?: number,
}