Liking cljdoc? Tell your friends :D

memento.base

Memoization library with many features.

memento.cache introduces Cache protocol that people need to extend when making extensions.

Memoization library with many features.

memento.cache introduces Cache protocol that people need to extend when making
extensions.
raw docstring

absentclj

Value that signals absent key.

Value that signals absent key.
sourceraw docstring

base-create-cacheclj

(base-create-cache conf)

Create a cache.

A conf is a map of cache settings, see memento.config namespace for names of settings.

Create a cache.

A conf is a map of cache settings, see memento.config namespace for names of settings.
sourceraw docstring

Cachecljprotocol

Protocol for Cache. It houses entries for multiple functions.

Most functions receive a Segment object that should be used to partition for different functions and using other :

  • id: use for separating caches, it is either name specified by user's config, or var name or function object
  • key-fn: key-fn from mount point, use this to generate cache key
  • f: use this function to load values
Protocol for Cache. It houses entries for multiple functions.

Most functions receive a Segment object that should be used to partition for different functions
and using other :
- id: use for separating caches, it is either name specified by user's config, or var name or function object
- key-fn: key-fn from mount point, use this to generate cache key
- f: use this function to load values

as-mapclj

(as-map this)
(as-map this segment)

Return all entries in the cache or all entries in the cache for a mount. The first variant returns a map with keys shaped like as per cache implementation, the second returns just some sort of a substructure of the first.

Return all entries in the cache or all entries in the cache for a mount.
The first variant returns a map with keys shaped like as per cache implementation, the second returns just some
sort of a substructure of the first.

cachedclj

(cached this segment args)

Return the cache value.

  • segment is Segment record provided by the mount point, it contains information that allows Cache to separate caches for different functions
Return the cache value.

- segment is Segment record provided by the mount point, it contains information that allows Cache
to separate caches for different functions

confclj

(conf this)

Return the conf for this cache.

Return the conf for this cache.

if-cachedclj

(if-cached this segment args)

Return cached value if present in cache or memento.base/absent otherwise.

Return cached value if present in cache or memento.base/absent otherwise.

invalidateclj

(invalidate this segment)
(invalidate this segment args)

Invalidate all the entries linked to a mount or a mount's single arg list, return Cache

Invalidate all the entries linked to a mount or a mount's single arg list, return Cache

invalidate-allclj

(invalidate-all this)

Invalidate all entries, returns Cache

Invalidate all entries, returns Cache

invalidate-idclj

(invalidate-id this id)

Invalidate entries with this secondary ID, returns Cache

Invalidate entries with this secondary ID, returns Cache

put-allclj

(put-all this segment args-to-vals)

Add entries as for a function

Add entries as for a function
sourceraw docstring

EntryMetaclj

source

new-cachecljmultimethod

Instantiate cache. Extension point, do not call directly.

Instantiate cache. Extension point, do not call directly.
sourceraw docstring

no-cacheclj

source

parse-time-scalarclj

(parse-time-scalar time-param)

Returns the scalar part of time spec. Time can be specified by integer or a vector of two elements, where first element is an integer and the other is the time unit keyword.

Returns the scalar part of time spec. Time can be specified by integer
or a vector of two elements, where first element is an integer and the other is
the time unit keyword.
sourceraw docstring

parse-time-unitclj

(parse-time-unit time-param)

Returns the time unit part of time spec. Time can be specified by integer or a vector of two elements, where first element is an integer and the other is the time unit keyword. If only integer is specified then time unit is seconds.

Returns the time unit part of time spec. Time can be specified by integer
or a vector of two elements, where first element is an integer and the other is
the time unit keyword. If only integer is specified then time unit is seconds.
sourceraw docstring

Segmentclj

source

unwrap-metaclj

(unwrap-meta o)
source

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

× close