Skip to content
This repository has been archived by the owner on Nov 27, 2018. It is now read-only.

marudor/node-cache-manager-hazelcast

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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,
}

About

Node Cache Manager for Hazelcast

Resources

License

Stars

Watchers

Forks

Packages