clojure.core.cache
-
Positional factory function for class clojure.core.cache.BasicCache.
function([cache])
Positional factory function for class clojure.core.cache.FIFOCache.
function([cache q limit])
Positional factory function for class clojure.core.cache.FnCache.
function([cache f])
Positional factory function for class clojure.core.cache.LIRSCache.
function([cache lruS lruQ tick limitS limitQ])
Positional factory function for class clojure.core.cache.LRUCache.
function([cache lru tick limit])
Positional factory function for class clojure.core.cache.LUCache.
function([cache lu limit])
Positional factory function for class clojure.core.cache.SoftCache.
function([cache rcache rq])
Positional factory function for class clojure.core.cache.TTLCacheQ.
function([cache ttl q gen ttl-ms])
B
Returns a pluggable basic cache initialized to `base`
function([base])
C
This is the protocol describing the basic cache capability.
value- function
([cache rcache rq])
D
- macro
([type-name fields & specifics])
E
Removes an entry from the cache
protocol-method([cache e])
F
Returns a FIFO cache with the cache and FIFO queue initialized to `base` -- the queue is filled as the values are pul...
function([base & {threshold :threshold, :or {threshold 32}}])
H
L
Returns an LIRS cache with the S & R LRU lists set to the indicated limits.
function([base & {:keys [s-history-limit q-history-limit], :or {s-history-limit 32, q-history-limit 32}}])
Retrieve the value associated with `e` if it exists, else `nil` in the 2-arg case. Retrieve the value associated wit...
protocol-method([cache e] [cache e not-found])
Returns an LRU cache with the cache and usage-table initialized to `base` -- each entry is initialized with the same ...
function([base & {threshold :threshold, :or {threshold 32}}])
Returns an LU cache with the cache and usage-table initialized to `base`. This function takes an optional `:threshol...
function([base & {threshold :threshold, :or {threshold 32}}])
M
- function
([v rq])
Is meant to be called if the cache is determined to **not** contain a value associated with `e`
protocol-method([cache e ret])
S
Is used to signal that the cache should be created with a seed. The contract is that said cache should return an inst...
protocol-method([cache base])
Returns a SoftReference cache. Cached values will be referred to with SoftReferences, allowing the values to be garba...
function([base])
T
The basic hit/miss logic for the cache system. Expects a wrap function and value function. The wrap function takes t...
function([cache item] [value-fn cache item] [wrap-fn value-fn cache item])
The basic hit/miss logic for the cache system. Like through but always has the cache argument in the first position f...
function([cache item] [cache item value-fn] [cache item wrap-fn value-fn])
Returns a TTL cache with the cache and expiration-table initialized to `base` -- each with the same time-to-live. ...
function([base & {ttl :ttl, :or {ttl 2000}}])