New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

node-localcache

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-localcache

LocalStorage with optional json file cache

0.1.4
latest
Source
npm
Version published
Maintainers
1
Created
Source

Node LocalCache Build Status

Module, allows to save application data between launches in json data file. Api most liked as LocalStorage API

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 with skipFileCaching: true) Path to cache file, also used as store id
  • skipFileCaching - (optional) disable file cache, default false

FS Perfomance

All manipulation agregating and applying 1 time per second. But, don't panic, on nodejs exit, everything will be saved into file.

Keywords

localstorage

FAQs

Package last updated on 25 Jun 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts