0.1.1 • Published 4 years ago
cache-manager-web v0.1.1
Cache-Manager-Web
Installation
npm install --save cache-manager-web
Usage
import CreateCache from 'cache-manager-web'
const Cache = CreateCache({
store: 'memory',
max: 100,
ttl: 5 * 1000
})
const getMockDate = () => new Promise((resolve, reject) => {
setTimeout(() => {
resolve({ success: true })
}, 500)
})
const init = async () => {
const key = 'test'
const data = await Cache.wrap(key, getMockDate)
}
init()
React.js Example
See the Cache-Manager-Web-Example to see use chche-manage-web
in your applications.
API
Features
- Improve README.md documentation
- 100% test coverage via mocha, nyc
License
cache-manager-web is licensed under the MIT license.