auru / unity-cache

Cache abstraction around localforage
0 stars 2 forks source link

Unity Cache

Travis-CI Coverage Status npm version Scrutinizer Deps Deps-Dev Dependency Status

Cache abstraction around Dexie.js.

Table of Contents

Installation

npm i --save unity-cache

API

createCache(stores, name, version);

Returns: {Object}

Use module's default export to create an API object.

Return asynchronous cache methods: get, set, remove, drop.

stores {Array}

Database stores (tables).

name {String} Optional

Default: unity

Database name.

version {Number|String} Optional

Default: 1

Database version. The old database with the same name will be deleted.

Usage

You can call methods like so: cache[method](store, key, value)

All methods are asynchronous.

Contributing

License

MIT © AuRu