Search

Suggested keywords:
  • Java
  • Docker
  • Git
  • React
  • NextJs
  • Spring boot
  • Laravel

Node Cache - A node internal (in-memory) caching module

  • Share this:

A simple caching module that has setget and delete methods and works a little bit like memcached. Keys can have a timeout (ttl) after which they expire and are deleted from the cache. All keys are stored in a single object so the practical limit is at around 1m keys.

const NodeCache = require( "node-cache" );
const myCache = new NodeCache();

const empObj = { id:"001", name: "xyz" };

myCache.set(empObj.id, empObj);
https://github.com/node-cache/node-cache
License: