time-cache
Version:
A key-value cache that puts a expiry date on its entries.
56 lines (36 loc) • 1.41 kB
Markdown
time-cache
==========
[](http://ipn.io)
[](http://webchat.freenode.net/?channels=%23ipfs)
[](https://travis-ci.org/diasdavid/time-cache)
[](https://coveralls.io/github/diasdavid/time-cache?branch=master)
[](https://david-dm.org/diasdavid/time-cache)
[](https://github.com/feross/standard)
> A key-value cache that puts a expiry date on its entries.
## Table of Contents
- [Install](#install)
- [npm](#npm)
- [Usage](#usage)
- [Example](#example)
- [API](#api)
- [Contribute](#contribute)
- [License](#license)
## Install
### npm
```sh
> npm install time-cache
```
## Usage
### Example
```js
// TODO (see tests meanwhile)
```
## API
### Create a time-cache `const tc = new TimeCache(options)`
### Add a value `tc.put(key, value, validity)`
### Has a value `tc.has(key)`
### Get a value `tc.get(key)`
## Contribute
Contributions are welcome!
## License
MIT