assoc-cache

0.0.3 • Public • Published

assoc-cache

A simple local memory cache via an associative array support .set() .get()

Installation

npm install assoc-cache

Usage

var cache = require('assoc-cache');
 
// usage
cache.set('foo', 'bar');
cache.get('foo', function(value){console.log(value)});
 

Which should print

bar

API

set function(key, value)

  • stores a value

get function(key, callback)

  • callback value or undefined

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.3
    2
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.3
    2
  • 0.0.2
    0
  • 0.0.1
    0

Package Sidebar

Install

npm i assoc-cache

Weekly Downloads

1

Version

0.0.3

License

MIT

Last publish

Collaborators

  • dirtv