0.0.2 • Published 7 years ago
cachinggg v0.0.2
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()
- get()
- refresh()
- clear()
- disable
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