taky-cache-loop
v0.0.2
Published
in-memory interval cache for high performance
Downloads
25
Maintainers
Readme
taky-cache-loop
install
using npm
npm i taky-cache-loop --save
example
CacheLoop = require 'taky-cache-loop'
cache = new CacheLoop {
key: '5sdate'
fn: ((cb) ->
cb null, new Date().getTime()
)
interval: '5 seconds'
}
every '1s', ->
log cache.read()
###
1406767835607
1406767835607
1406767835607
1406767835607
1406767835607
1406767840608
1406767840608
1406767840608
1406767840608
1406767840608
1406767845609
1406767845609
###