Nuclear Powered Mushroom
    Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    node-localcachepublic

    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.

    install

    npm i node-localcache

    Downloadsweekly downloads

    3,067

    version

    0.1.4

    license

    MIT

    repository

    githubgithub

    last publish

    collaborators

    • avatar