cache-manager-web

0.1.1 • Public • Published

Cache-Manager-Web

Build Status Coverage Status npm

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.

Readme

Keywords

none

Package Sidebar

Install

npm i cache-manager-web

Weekly Downloads

0

Version

0.1.1

License

MIT

Unpacked Size

13.1 kB

Total Files

9

Last publish

Collaborators

  • shianqi