An open API service indexing awesome lists of open source software.

https://github.com/fujiharuka/kv-file-cache


https://github.com/fujiharuka/kv-file-cache

Last synced: 4 months ago
JSON representation

Awesome Lists containing this project

README

        

# kv-file-cache

Key value cache store using a file for a value.

## Installation

```
$ npm install kv-file-cache
```

## Example

```js
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()
})()
```