Skip to content

Latest commit

 

History

History
32 lines (15 loc) · 551 Bytes

INDEX.md

File metadata and controls

32 lines (15 loc) · 551 Bytes

API

cacheJS.set(key,value,ttl,context)

key: an array(object).

value: only support string at the momment.

ttl: time to live (in seconds), default: 604800

context: array of contexts related to the cache

cacheJS.get(key)

key: an array(object).

cacheJS.removeByKey(key)

key: an array(object).

cacheJS.removeByContext(context)

key: an array(object).

cacheJS.use(provider)

Switch cache provider (localStorage is the default provider)

provider: provider name ('localStorage','array').