kv-file-cache

1.0.1 • Public • Published

kv-file-cache

Key value cache store using a file for a value.

Installation

$ npm install kv-file-cache

Example

const KvFileCache = require('kv-file-cache')

;(async () => {
  const cache = new KvFileCache('tmp/test')
  await cache.set('key', 'value')
  const has = await cache.has('key') // true
  const value = await cache.get('key') // 'value'
  await cache.clear('key')
  await cache.clearAll()
})()

Dependents (0)

Package Sidebar

Install

npm i kv-file-cache

Weekly Downloads

0

Version

1.0.1

License

MIT

Unpacked Size

3.93 kB

Total Files

6

Last publish

Collaborators

  • fuji_haruka