JSPM

node-localcache

0.1.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 5875
  • Score
    100M100P100Q126921F
  • License MIT

LocalStorage with optional json file cache

Package Exports

  • node-localcache

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (node-localcache) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Node LocalCache Build Status

Module, allows to save application data between launches (like LocalStorage in browser).

Usage

var LocalCache = require('node-localcache');

cache = new LocalCache('.cache/filetocache.json');
cache.setItem('key', 'value');
cache.getItem('key'); // value

Options

new LocalCache(fileName, skipFileCaching);
  • fileName - (optional) Path to cache file, also used as store id
  • skipFileCaching - (optional) disable file cache, default false

Perfomance

All FS manipulation agregating and applying 1 time per second.