Liking cljdoc? Tell your friends :D
Clojure only.

strojure.caffeine-memoize.core


CacheOpscljprotocol

Operations on the cache of the memoized cache.

Operations on the cache of the memoized cache.

clear!clj

(clear! f)
(clear! f args)

Invalidates memoized value of function f for args or all values when no args provided.

Invalidates memoized value of function `f` for `args` or all values when no
`args` provided.

put!clj

(put! f args v)

Puts value v in the cache of function f for args.

Puts value `v` in the cache of function `f` for `args`.
sourceraw docstring

memoizeclj

(memoize f args-key cache-spec)

Returns function f memoized using Caffeine. Arguments are transformed to cache key using args-key function. Cache is configured with cache-spec string accordingly to https://tinyurl.com/caffeine-cache-spec.

Example:

(memoize my-function vec "expireAfterWrite=10s").
Returns function `f` memoized using Caffeine. Arguments are transformed to
cache key using `args-key` function. Cache is configured with `cache-spec`
string accordingly to https://tinyurl.com/caffeine-cache-spec.

Example:

    (memoize my-function vec "expireAfterWrite=10s").

sourceraw docstring

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

× close