lambda-local-cache

1.0.3 • Public • Published

lambda-local-cache for JS objects

Installation :

npm install lambda-local-cache --save

How to use

const lambdaLocalCache = require( 'lambda-local-cache' );
 
let collectionName = 'COLLECTION_NAME'
 
let options = {
    indexes: ['index1', 'index2'], // first index name is treated as primary index
    expire : 5 // in minutes
};
 
 
let cache = new lambdaLocalCache(collectionName, options);
 
 
// METHODS
 
cache.set(value, expire);
 
cache.get('key', 'indexName');
 
cache.remove('key', 'indexName');
 
cache.clear();
 
 
## License
 
MIT

Package Sidebar

Install

npm i lambda-local-cache

Weekly Downloads

270

Version

1.0.3

License

MIT

Last publish

Collaborators

  • kherkeladze
  • shortjared