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.
Protocol for Cache. It houses entries for multiple functions.
Args-key is a cache key, presumably created from argument list, and it's used to determine 'same args' for caching purposes. Usually it's same as args.
Protocol for Cache. It houses entries for multiple functions. Args-key is a cache key, presumably created from argument list, and it's used to determine 'same args' for caching purposes. Usually it's same as args.
(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.
(cached this segment args)
Return the cache value.
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
(conf this)
Return the conf for this cache.
Return the conf for this cache.
(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.
(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-all this)
Invalidate all entries, returns Cache
Invalidate all entries, returns Cache
(invalidate-id this id)
Invalidate entries with this secondary ID, returns Cache
Invalidate entries with this secondary ID, returns Cache
(put-all this segment args-to-vals)
Add entries as for a function
Add entries as for a function
Instantiate cache. Extension point, do not call directly.
Instantiate cache. Extension point, do not call directly.
(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.
(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.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close