valuecache

0.0.5 • Public • Published

Build Status

features

  • promise supports
  • ttl support
  • delete and get elements in the form of arrays
  • json format data storage and retrieval

install

npm i --save valuecache@latest

usage

 
const valuecache = require('valuecache')
 
const cache = valuecache({
  // redis configuration ..
})
 
(async () => {
  
  await cache.set('foo', 'bar')
  
  await cache.set('data', {
    foo: "bar"
  })
  
  await cache.get('data')
  
  // { "foo": "bar" }
  
  await cache.get('data')
  
  // "bar"
  
  await cache.get(['foo', 'data'])
  
  // [{ "foo": "bar" }, "bar"]
  
  await cache.del(['foo', 'data'])
 
})()
 

Readme

Keywords

Package Sidebar

Install

npm i valuecache

Weekly Downloads

0

Version

0.0.5

License

MIT

Unpacked Size

4.67 kB

Total Files

6

Last publish

Collaborators

  • cond