(per-item-ttl-cache-factory base & {get-ttl :ttl-getter})Returns a TTL cache with the cache and expiration-table initialied to base --
each item in base with its own time-to-live.
This function also takes a :get-ttl keyword argument that defines
a function which is applied to the key and value of any added entry,
and is expected to return the TTL -in milli-seconds- for the entry.
Returns a TTL cache with the cache and expiration-table initialied to `base` -- each item in `base` with its own time-to-live. This function also takes a `:get-ttl` keyword argument that defines a function which is applied to the key and value of any added entry, and is expected to return the TTL -in milli-seconds- for the entry.
(ttl-cache-factory base & {ttl :ttl :or {ttl 2000}})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. If not
specified, a default of 2000 milliseconds is used.
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. If not specified, a default of 2000 milliseconds is used.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |