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.
Contains map of mount point to cache instance
Contains map of mount point to cache instance
(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])
(assoc-cache-tags index cache-tags ref)
Add Mount Point ref to tag index
Add Mount Point ref to tag index
(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.
(create-mount f cache mount-conf)
Create mount record by specified map conf
Create mount record by specified map conf
(dissoc-cache-tags index ref)
Remove Mount Point ref from tag index
Remove Mount Point ref from tag index
(mount-point obj)
Return active mount point from the object's meta.
Return active mount point from the object's meta.
Protocol for cache mount
Protocol for cache mount
(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.
(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.
(get-tags this)
Coll of tags for this mount point
Coll of tags for this mount point
(invalidate this args)
Invalidate entry for args, returns Cache
Invalidate entry for args, returns Cache
(invalidate-all this)
Invalidate all entries, returns Cache
Invalidate all entries, returns Cache
(mounted-cache this)
Returns currently mounted Cache.
Returns currently mounted Cache.
(original-function this)
Returns the original function
Returns the original function
(put-all this args-to-vals)
Add entries to cache, returns Cache
Add entries to cache, returns Cache
(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.
(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.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close