(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.
(cleanup cache)
Performs any pending maintenance operations needed by the cache.
Performs any pending maintenance operations needed by the cache.
(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)))
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-
(estimated-size cache)
Returns the approximate number of entries in this cache.
Returns the approximate number of entries in this cache.
(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.
(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'.
(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.
(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.
(invalidate! cache k)
Disassociates the value cached for the key.
Disassociates the value cached for the key.
(invalidate-all! cache)
(invalidate-all! cache ks)
Disassociates all the values in the cache.
Disassociates all the values in the cache.
(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.
(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.
(put! cache k v)
Associates the value with the key in this cache.
Associates the value with the key in this cache.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close