Liking cljdoc? Tell your friends :D

memento.base

Memoization library with many features.

This namespace includes internal tooling and shouldn't be used directly unless writing extensions.

Memoization library with many features.

This namespace includes internal tooling and shouldn't be used directly
unless writing extensions.
raw docstring

active-cacheclj

(active-cache obj)

Return active cache from the object's meta.

Return active cache from the object's meta.
sourceraw docstring

add-keyword-nsclj

(add-keyword-ns the-ns k)
source

attachclj

(attach f spec enabled? default-type)

Attach a cache to a fn or var. Internal function.

Scrape var or fn meta and add it to the spec.

Merge fn meta, var meta, spec.

Attach a cache to a fn or var. Internal function.

Scrape var or fn meta and add it to the spec.

Merge fn meta, var meta, spec.
sourceraw docstring

Cachecljprotocol

Protocol for Cache. If Cache for a Region, it needs to check if Region is started to engage in caching.

Protocol for Cache. If Cache for a Region, it needs to check if Region is started
to engage in caching.

as-mapclj

(as-map this)

Returns the cache as a map. This does not imply a snapshot, as implementation might provide a weakly consistent view of the cache.

Returns the cache as a map. This does not imply a snapshot,
as implementation might provide a weakly consistent view of the cache.

get-cachedclj

(get-cached this args)

Return cached value, possibly invoking the function with the args to obtain the value.

This should be a thread-safe atomic operation.

Return cached value, possibly invoking the function with the args to
obtain the value.

This should be a thread-safe atomic operation.

invalidateclj

(invalidate this arg)

Invalidate entry for args, returns Cache

Invalidate entry for args, returns Cache

invalidate-allclj

(invalidate-all this)

Invalidate all entries, returns Cache

Invalidate all entries, returns Cache

put-allclj

(put-all this args-to-vals)

Add entries to cache, returns Cache

Add entries to cache, returns Cache
sourceraw docstring

CacheRegioncljprotocol

Protocol for Caches for the regions. Main difference from Cache being that is houses entries for multiple functions. As such it takes additional parameter of function.

Protocol for Caches for the regions. Main difference from Cache being
that is houses entries for multiple functions. As such it takes additional
parameter of function.

as-map*clj

(as-map* this)

Returns the cache as a map. This does not imply a snapshot, as implementation might provide a weakly consistent view of the cache.

Returns the cache as a map. This does not imply a snapshot,
as implementation might provide a weakly consistent view of the cache.

cache-as-mapclj

(cache-as-map this region-cache)

Return all entries for a RegionCache.

Return all entries for a RegionCache.

get-cached*clj

(get-cached* this region-cache args)

Return the cache value for the function and args, possibly invoking the function.

  • region-cache is RegionCache instance This should be a thread-safe atomic operation.
Return the cache value for the function and args, possibly invoking the function.
- region-cache is RegionCache instance
This should be a thread-safe atomic operation.

invalidate*clj

(invalidate* this region-cache args)

Invalidate an arglist for RegionCache

Invalidate an arglist for RegionCache

invalidate-cachedclj

(invalidate-cached this region-cache)

Invalidate all keys stemming from this RegionCache

Invalidate all keys stemming from this RegionCache

invalidate-regionclj

(invalidate-region this)

Invalidate all entries, returns Region

Invalidate all entries, returns Region

put-all*clj

(put-all* this region-cache args-to-vals)

Add entries to RegionCache

Add entries to RegionCache
sourceraw docstring

create-cachecljmultimethod

Creates a cache for a function with the spec.

Creates a cache for a function with the spec.
sourceraw docstring

create-regioncljmultimethod

source

direct-specclj

(direct-spec spec)

The spec given directly (not from var or fn meta) can have non-namespaced keys, which we will namespace.

The spec given directly (not from var or fn meta) can have non-namespaced keys, which
we will namespace.
sourceraw docstring

new-regionclj

(new-region region-id raw-spec default-type)

Convenience function for making new regions

Convenience function for making new regions
sourceraw docstring

NonCachedclj

source

RegionCacheclj

source

regionsclj

source

unwrap-noncachedclj

(unwrap-noncached o)
source

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

× close