npm stats
  • Search
  • About
  • Repo
  • Sponsor
  • more
    • Search
    • About
    • Repo
    • Sponsor

Made by Antonio Ramirez

throwaway-local-cache

1.3.0

@mafintosh

npmHomeRepoSnykSocket
Downloads:383
$ npm install throwaway-local-cache
DailyWeeklyMonthlyYearly

throwaway-local-cache

npm install throwaway-local-cache

Usage

const Cache = require('throwaway-local-cache')

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