(memoize-refreshing fn ttl)
take a function and return a memoized function that
will re-invoke the function once the ttl is up (every ttl
milliseconds)
take a function and return a memoized function that will re-invoke the function once the ttl is up (every `ttl` milliseconds)
(refresh-cache-factory base & {ttl :ttl :or {ttl 2000}})
base
--
each with the same time-to-live.This function also allows an optional :ttl
argument that defines the default
time in milliseconds that entries are allowed to reside in the cache.
* The difference between refresh and ttl is that this cache will always return you a value if one has been available. It will only evict on misses * Returns a TTL cache with the cache and expiration-table initialied to `base` -- each with the same time-to-live. This function also allows an optional `:ttl` argument that defines the default time in milliseconds that entries are allowed to reside in the cache.
(refreshing fn ttl)
takes a fn and ttl returns a lazy identity which, when deref'd will invoke the function fn.
the value of which will be cached for ttl
milliseconds at which point a further deref will
re-invoke the function (caching again for ttl
)
takes a fn and ttl returns a lazy identity which, when deref'd will invoke the function fn. the value of which will be cached for `ttl` milliseconds at which point a further deref will re-invoke the function (caching again for `ttl`)
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close