(delete k)
Deletes value from a 2-level cache (local+memcache).
Deletes value from a 2-level cache (local+memcache).
(get k)
(get k timeout)
Gets value from a 2-level cache (local+memcache). If key is not in local cache, the remote memcache gets queried. If it does contain the key, the value is returned and optionally put in local cache (if timeout argument is specified).
Gets value from a 2-level cache (local+memcache). If key is not in local cache, the remote memcache gets queried. If it does contain the key, the value is returned and optionally put in local cache (if timeout argument is specified).
(get-or-load k loader timeout)
Gets value from a 2-level cache (local+memcache). If the key is not in cache, loads it by calling loader function and stores the result in cache and returns it.
Gets value from a 2-level cache (local+memcache). If the key is not in cache, loads it by calling loader function and stores the result in cache and returns it.
(get-or-load> k loader> timeout)
Asynchronous version of get-or-load. Gets value from a 2-level cache. If the key is not in cache,loads it by calling loader function and stores the result in cache and returns it. Returns core.async channel that will contain the value. Loader function should also return a core.async channel with loaded value.
Asynchronous version of get-or-load. Gets value from a 2-level cache. If the key is not in cache,loads it by calling loader function and stores the result in cache and returns it. Returns core.async channel that will contain the value. Loader function should also return a core.async channel with loaded value.
(lget-or-load> k loader> timeout & {:keys [allow-nil?] :or {allow-nil? true}})
(rget-or-load> k loader>)
(rget-or-load> k
loader>
timeout
&
{:keys [throw? allow-nil?] :or {allow-nil? true}})
Gets value from cache or loads it via async function, ensuring there's only one loader active for given key (ie. it's synchronized for given key). Loader function must return core.async channel.
Gets value from cache or loads it via async function, ensuring there's only one loader active for given key (ie. it's synchronized for given key). Loader function must return core.async channel.
(set k v timeout)
Puts value in a 2-level cache (local+memcache).
Puts value in a 2-level cache (local+memcache).
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close