15.6.2 • Published 5 years ago
@the-/cache v15.6.2
@the-/cache
Cache manager of the-frameworks
Installation
$ npm install @the-/cache --save
Usage
'use strict'
const theCache = require('@the-/cache')
async function tryExample() {
const cache = theCache({
max: 10000,
maxAge: 3600000,
})
cache.set('foo', 'bar')
const foo = cache.get('foo')
console.log(foo) // -> 'bar'
cache.reset() // remove all
}
tryExample().catch((err) => console.error(err))
API Guide
- module:@the-/cache
- TheCache
See API Guide for more detail
License
This software is released under the MIT License.