Liking cljdoc? Tell your friends :D

memento.guava

Guava cache implementation.

Guava cache implementation.
raw docstring

CacheKeyclj


conf->builderclj

(conf->builder {:memento.core/keys [concurrency initial-capacity size< ttl fade]
                :memento.guava/keys [weight< removal-listener kv-weight
                                     weak-keys weak-values soft-values refresh
                                     stats ticker]}
               sec-index)

Creates and configures common parameters on the builder.

Creates and configures common parameters on the builder.
raw docstring

conf->sec-indexclj

(conf->sec-index {:memento.core/keys [concurrency initial-capacity]})

Creates secondary index for evictions

Creates secondary index for evictions
raw docstring

GCacheclj


load-dataclj

(load-data cache data-map)

nil-entryclj


process-non-cachedclj

(process-non-cached obj)

Unwrap EntryMeta objects and throw exception to prevent caching if no-cache? is set.

Unwrap EntryMeta objects and throw exception to prevent caching if no-cache? is set.
raw docstring

sec-index-conj-entryclj

(sec-index-conj-entry sec-index k v)

Add entry to secondary index. k is CacheKey of incoming Cache entry v is value of incoming cache entry, might be EntryMeta, if it is then we use each tag-idents as key (id) pointing to a HashSet of CacheKeys.

For each ID we add CacheKey to its HashSet.

Add entry to secondary index.
k is CacheKey of incoming Cache entry
v is value of incoming cache entry, might be EntryMeta, if it is then we use each tag-idents
as key (id) pointing to a HashSet of CacheKeys.

For each ID we add CacheKey to its HashSet.
raw docstring

sec-index-disj-entryclj

(sec-index-disj-entry sec-index k v)

Remove value from secondary index, processing EntityMeta if there is one.

k is CacheKey of Cache entry being removed v is value of Cache entry, might be EntryMeta, if it is then we use each of tag-idents as key (id) pointing to a HashSet. We remove CacheKey from each set, removing the whole entry if the resulting set is empty.

Remove value from secondary index, processing EntityMeta if there is one.

k is CacheKey of Cache entry being removed
v is value of Cache entry, might be EntryMeta, if it is then we use each of tag-idents as key (id)
pointing to a HashSet. We remove CacheKey from each set, removing the whole entry if the resulting
set is empty.
raw docstring

statsclj

(stats fn-or-cache)

Return guava stats for the cache if it is a Guava Cache.

Takes a memoized fn or a Cache instance as a parameter.

Returns com.google.common.cache.CacheStats

Return guava stats for the cache if it is a Guava Cache.

Takes a memoized fn or a Cache instance as a parameter.

Returns com.google.common.cache.CacheStats
raw docstring

to-dataclj

(to-data cache)

val->indexed-cachedclj

(val->indexed-cached sec-index k v)

Converts value into a representation that is suitable for the Cache (no nils), and also registers it with the secondary index. Returned value should not be discarded.

Converts value into a representation that is suitable for the Cache (no nils),
and also registers it with the secondary index. Returned value should not be discarded.
raw docstring

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

× close