npm.io
0.0.2 • Published 9 years ago

cachinggg

Licence
ISC
Version
0.0.2
Deps
3
Vulns
0
Weekly
0

Cachinggg

Module for simple key/value store, with just one key. It'a wrapper around node-persist, in sync mode.

Install

npm install @piemme/cachinggg --save

API


put(someStuff)

get()

refresh(someStuff)

answer(clear)

disable

Example:

var cachinggg = require ('cachinggg')
cachinggg.put('beep')
var content = cachinggg.get()
// obtain 'beep'

// and now refresh cache with a new content
// cache system verify if value is the same in cache
cachinggg.refresh(someContent, function () {
  var content = cachinggg.get()
})

License

MIT