Liking cljdoc? Tell your friends :D

memento.mount

Mount points, they serve as glue between a cache that can house entries from multiple functions and the individual functions.

Mount points, they serve as glue between a cache that can house entries from
multiple functions and the individual functions.
raw docstring

*caches*clj

Contains map of mount point to cache instance

Contains map of mount point to cache instance
sourceraw docstring

alter-caches-mappingclj

(alter-caches-mapping tag update-fn & update-fn-args)

Internal function. Modifies entire tagged cache map with the provided function. Applies the function as (fn [caches refs & other-update-fn-args])

Internal function. Modifies entire tagged cache map with the provided function.
Applies the function as (fn [*caches* refs & other-update-fn-args])
sourceraw docstring

assoc-cache-tagsclj

(assoc-cache-tags index cache-tags ref)

Add Mount Point ref to tag index

Add Mount Point ref to tag index
sourceraw docstring

bindclj

(bind fn-or-var mount-conf cache)

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

Bind a cache to a fn or var. Internal function.
sourceraw docstring

configuration-propsclj

source

create-mountclj

(create-mount f cache mount-conf)

Create mount record by specified map conf

Create mount record by specified map conf
sourceraw docstring

dissoc-cache-tagsclj

(dissoc-cache-tags index ref)

Remove Mount Point ref from tag index

Remove Mount Point ref from tag index
sourceraw docstring

mount-pointclj

(mount-point obj)

Return active mount point from the object's meta.

Return active mount point from the object's meta.
sourceraw docstring

MountPointcljprotocol

Protocol for cache mount

Protocol for cache mount

cachedclj

(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.

handle-eventclj

(handle-event this evt)

Handles event using internal event handling mechanism, usually a function

Handles event using internal event handling mechanism, usually a function

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

mounted-cacheclj

(mounted-cache this)

Returns currently mounted Cache.

Returns currently mounted Cache.

get-tagsclj

(get-tags this)

Coll of tags for this mount point

Coll of tags for this mount point

invalidateclj

(invalidate this args)

Invalidate entry for args, returns Cache

Invalidate entry for args, returns Cache

if-cachedclj

(if-cached this 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.

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.

original-functionclj

(original-function this)

Returns the original function

Returns the original function
sourceraw docstring

reify-mount-confclj

(reify-mount-conf mount-conf)

Transform user given mount-conf to a canonical form of a map.

Transform user given mount-conf to a canonical form of a map.
sourceraw docstring

TaggedMountPointclj

source

tagsclj

Map tag to mount-point

Map tag to mount-point
sourceraw docstring

UntaggedMountPointclj

source

update-existingclj

(update-existing m ks update-fn)

Convenience function. Updates ks's that are present with the provided update fn.

Convenience function. Updates ks's that are present with the provided update fn.
sourceraw docstring

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

× close