Introduction
A libabry for caching your client data
Install
npm install arida-cache
Usage example
{{this {console;}this {console;}}const funcsInstance = ;cache;funcsInstance;console;;}
Run the example above, you will get result below:
a is runingpost{ ca1a41f90da606b052ecf10c8286817813bc8861: { a: 1 } }prea is runingpost{ ca1a41f90da606b052ecf10c8286817813bc8861: { a: 1 } }
API
The following is an incomplete list of arida API. It should give you a general concept of arida's usage.
.init
: function(funcs, duration, context, funcName): config the cache
funcs: present the func will be hooked
duration: set the cache's duration
context: should be assign if not in window or global
funcName: must be assign otherwise not anyoumous.get()
: Returns cache;
Contributing
We welcome all contributions, please submit any ideas as pull requests or as a GitHub issue.
Licence
MIT