throwaway-local-cache
v1.1.0
Published
Maintain a fast local cache when persistance isnt a 100% requirement
Downloads
249
Readme
throwaway-local-cache
npm install throwaway-local-cache
Usage
const Cache = require('throwaway-cache-storage')
const c = new Cache('./cache') // pass the local folder to use
await c.get('key') // get an entry
c.queuePut('key', { value: true }) // queue a put, will be persisted later
c.queueDelete('key') // queue a deletion, will be persisted later
await c.flush() // force persist it
License
Apache-2.0