https://github.com/fujiharuka/kv-file-cache
https://github.com/fujiharuka/kv-file-cache
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/fujiharuka/kv-file-cache
- Owner: FujiHaruka
- Created: 2018-12-19T02:31:09.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-12-28T05:37:45.000Z (over 6 years ago)
- Last Synced: 2025-02-08T07:05:02.009Z (4 months ago)
- Language: JavaScript
- Size: 2.93 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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()
})()
```