Liking cljdoc? Tell your friends :D

memento.caffeine.config

Caffeine implementation config helpers.

Contains documented definitions of standard options of Caffeine cache config.

Caffeine implementation config helpers.

Contains documented definitions of standard options of Caffeine cache config.
raw docstring

expiryclj

A cache and function bind setting, an instance of memento.caffeine.Expiry interface.

Enables user to specify cached entry expiry on each entry individually. If interface functions return nil, then ttl and fade settings apply.

A cache and function bind setting, an instance of memento.caffeine.Expiry interface.

Enables user to specify cached entry expiry on each entry individually. If interface
functions return nil, then ttl and fade settings apply.
sourceraw docstring

kv-weightclj

Cache setting, a function of 3 arguments (fn [f key value] int-weight), that will be used to determine the weight of entries.

It should return an int, the weight of the entry.

The 3 arguments are:

  • the first argument is the function being cached
  • the second argument is the key (arg-list transformed by key-fn if any)
  • the third argument is the value (after ret-fn being applied)
Cache setting, a function of 3 arguments (fn [f key value] int-weight),
that will be used to determine the weight of entries.

It should return an int, the weight of the entry.

The 3 arguments are:
- the first argument is the function being cached
- the second argument is the key (arg-list transformed by key-fn if any)
- the third argument is the value (after ret-fn being applied)
sourceraw docstring

meta-expiryclj

A memento.caffeine.Expiry instance that looks for fade and ttl keys on object metas and uses those to control variable expiry.

A memento.caffeine.Expiry instance that looks for fade and ttl keys on object metas and uses those to control
variable expiry.
sourceraw docstring

removal-listenerclj

Cache setting, corresponds to .removalListener on Caffeine.

A function of four arguments (fn [f key value removal-cause] nil), that will be called whenever an entry is removed.

The four arguments are:

  • the function being cached
  • the key (arg-list transformed by key-fn if any)
  • the value (after ret-fn being applied)
  • com.github.benmanes.caffeine.cache.RemovalCause

Warning: any exception thrown by listener will not be propagated to the Cache user, only logged via a Logger.

Cache setting, corresponds to .removalListener on Caffeine.

A function of four arguments (fn [f key value removal-cause] nil),
that will be called whenever an entry is removed.

The four arguments are:

- the function being cached
- the key (arg-list transformed by key-fn if any)
- the value (after ret-fn being applied)
- com.github.benmanes.caffeine.cache.RemovalCause

Warning: any exception thrown by listener will not be propagated to the Cache user, only logged via a Logger.
sourceraw docstring

soft-valuesclj

Cache setting, corresponds to .softValues on CacheBuilder.

Boolean flag, enabling storing values using soft references.

Softly referenced objects are garbage-collected in a globally least-recently-used manner, in response to memory demand. Because of the performance implications of using soft references, we generally recommend using the more predictable maximum cache size instead.

Cache setting, corresponds to .softValues on CacheBuilder.

Boolean flag, enabling storing values using soft references.

Softly referenced objects are garbage-collected in a globally least-recently-used manner,
in response to memory demand. Because of the performance implications of using soft references,
we generally recommend using the more predictable maximum cache size instead.
sourceraw docstring

statsclj

Cache setting, boolean flag, enabling collection of stats.

Corresponds to .enableStats on CacheBuilder.

You can retrieve a cache's stats by using memento.caffeine/stats.

Returns com.google.common.cache.CacheStats instance or nil.

Cache setting, boolean flag, enabling collection of stats.

Corresponds to .enableStats on CacheBuilder.

You can retrieve a cache's stats by using memento.caffeine/stats.

Returns com.google.common.cache.CacheStats instance or nil.
sourceraw docstring

tickerclj

Cache setting, corresponds to .ticker on CacheBuilder.

A function of zero arguments that should return current nano time. This is used when doing time based eviction.

The default is (fn [] (System/nanoTime)).

This is useful for testing and you can also make the time move in discrete amounts (e.g. you can make all cache accesses in a request have same time w.r.t. eviction).

Cache setting, corresponds to .ticker on CacheBuilder.

A function of zero arguments that should return current nano time.
This is used when doing time based eviction.

The default is (fn [] (System/nanoTime)).

This is useful for testing and you can also make the time move in discrete amounts (e.g. you can
make all cache accesses in a request have same time w.r.t. eviction).
sourceraw docstring

weak-valuesclj

Cache setting, corresponds to .weakValues on CacheBuilder.

Boolean flag, enabling storing values using weak references.

This allows entries to be garbage-collected if there are no other (strong or soft) references to the values.

Cache setting, corresponds to .weakValues on CacheBuilder.

Boolean flag, enabling storing values using weak references.

This allows entries to be garbage-collected if there are no other (strong or soft) references to the values.
sourceraw docstring

weight<clj

Cache setting, a long.

Specifies the maximum weight of entries the cache may contain. If using this option, you must provide kw-weight option for cache to calculate the weight of entries.

A cache may evict entries before the specified limit is reached.

Cache setting, a long.

Specifies the maximum weight of entries the cache may contain. If using this option,
you must provide `kw-weight` option for cache to calculate the weight of entries.

A cache may evict entries before the specified limit is reached.
sourceraw docstring

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

× close