SimpleKache
Simple library to chain and run functions with asynchronous calls.
Installation
Via npm on Node:
npm install simplekache
Usage
Reference in your program:
var sk = ;
Create cache:
var cache = sk;
Get undefined item:
var item = sk; // null
Set and get item:
sk;var item = sk; // 1
Set item with lifetime in microseconds:
sk;
If the item is not queried in one second, the value is removed from cache. If the item is queried in the past second, then the lifetime is extended ONE second more, not since the query time, but since the expiration check time.
Samples
TBD
Versions
- 0.0.1 Published
License
MIT
References
Contribution
Feel free to file issues and submit pull requests � contributions are welcome<
If you submit a pull request, please be sure to add or update corresponding
test cases, and ensure that npm test
continues to pass.