taky-cache-loop

0.0.2 • Public • Published

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
###

Package Sidebar

Install

npm i taky-cache-loop

Weekly Downloads

0

Version

0.0.2

License

none

Last publish

Collaborators

  • taky