free-cache

1.0.1 • Public • Published

free-cache

Simple cache tool with required functions | easy to use.

Installation

npm install free-cache --save

Usage

var freeCache = require('free-cache');

// now ready to to use the cache

freeCache.put('email', 'my-email-id', true);
console.log(freeCache.get('email'));

// set timeout for specific key-value

freeCache.put('token', 'token-to-expire', true, 1000); // Time in ms

// set overwrite to false for a key for data integrity

freeCache.put('id', 'dont-overwrite-me', false);

//other functions
freeCache.delete('id');

console.log(freeCache.memsize('id'));

console.log(freeCache.getAllKeys('id'));

Package Sidebar

Install

npm i free-cache

Weekly Downloads

0

Version

1.0.1

License

ISC

Unpacked Size

3.33 kB

Total Files

3

Last publish

Collaborators

  • kamalrkk98