Skip to content

auru/unity-cache

Folders and files

NameName
Last commit message
Last commit date

Latest commit

cbec27a · Aug 30, 2019

History

44 Commits
Aug 30, 2019
Jun 25, 2019
Jun 25, 2019
Jun 25, 2019
Dec 12, 2016
Nov 8, 2016
Jun 25, 2019
Oct 17, 2017
Feb 8, 2017
Jun 25, 2019

Repository files navigation

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

  • Provide conventional commit messages by using npm run commit instead of git commit.
  • Core contributors: use GitHub's Rebase and merge as a default way of merging PRs.

License

MIT © AuRu