Liking cljdoc? Tell your friends :D

cloffeine.cache


as-mapclj

(as-map cache)

Returns a view of the entries stored in this cache as a thread-safe map.

Returns a view of the entries stored in this cache as a thread-safe map.
sourceraw docstring

cleanupclj

(cleanup cache)

Performs any pending maintenance operations needed by the cache.

Performs any pending maintenance operations needed by the cache.
sourceraw docstring

computeclj

(compute cache k remapper-fn)

Attempts to compute a mapping for the specified key and its current mapped value (or nil if there is no current mapping). For example, to either create or append a String msg to a value mapping: (compute cache "k" (fn [k, v] (if (nil? v) msg (str v msg)))

See: https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ConcurrentMap.html#compute-K-java.util.function.BiFunction-

Attempts to compute a mapping for the specified key and its current mapped
value (or nil if there is no current mapping).
For example, to either create or append a String msg to a value mapping:
`(compute cache "k" (fn [k, v] (if (nil? v) msg (str v msg)))`

See: https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ConcurrentMap.html#compute-K-java.util.function.BiFunction-
sourceraw docstring

estimated-sizeclj

(estimated-size cache)

Returns the approximate number of entries in this cache.

Returns the approximate number of entries in this cache.
sourceraw docstring

getclj

(get cache k loading-fn)

Returns the value associated with the key in this cache, obtaining that value from the mappingFunction if necessary.

Returns the value associated with the key in this cache, obtaining that value
from the mappingFunction if necessary.
sourceraw docstring

get-allclj

(get-all cache ks mapping-fn)

Returns a map of the values associated with the keys, creating or retrieving those values if necessary using 'mapping-fn'.

Returns a map of the values associated with the keys, creating or retrieving
those values if necessary using 'mapping-fn'.
sourceraw docstring

get-all-presentclj

(get-all-present cache ks)

Returns a map of all the values associated with the keys in this cache.

Returns a map of all the values associated with the keys in this cache.
sourceraw docstring

get-if-presentclj

(get-if-present cache k)

Returns the value associated with the key in this cache, or nil if there is no cached value for the key.

Returns the value associated with the key in this cache, or nil if there is
no cached value for the key.
sourceraw docstring

invalidate!clj

(invalidate! cache k)

Disassociates the value cached for the key.

Disassociates the value cached for the key.
sourceraw docstring

invalidate-all!clj

(invalidate-all! cache)
(invalidate-all! cache ks)

Disassociates all the values in the cache.

Disassociates all the values in the cache.
sourceraw docstring

make-cacheclj

(make-cache)
(make-cache settings)

Create a LoadingCache. See cloffeine.common/builder for settings. A semi-persistent mapping from keys to values. Cache entries are manually added using get(Object, Function) or put(Object, Object), and are stored in the cache until either evicted or manually invalidated.

Create a LoadingCache. See `cloffeine.common/builder` for settings.
A semi-persistent mapping from keys to values. Cache entries are manually added
using get(Object, Function) or put(Object, Object), and are stored in the cache
until either evicted or manually invalidated.
sourceraw docstring

policyclj

(policy cache)

Returns access to inspect and perform low-level operations on this cache based on its runtime characteristics.

Returns access to inspect and perform low-level operations on this cache based
on its runtime characteristics.
sourceraw docstring

put!clj

(put! cache k v)

Associates the value with the key in this cache.

Associates the value with the key in this cache.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close