0.0.2 • Published 7 years ago

cachinggg v0.0.2

Weekly downloads
3
License
ISC
Repository
github
Last release
7 years ago

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