Liking cljdoc? Tell your friends :D

hara.state.base.cache


cacheclj

(cache data)
(cache data {:keys [tag display type] :as metadata :or {type :atom}})

creates a cache with the following properties

(-> (cache {} {:tag "stuff" :type :ref}) (.state)) => clojure.lang.Ref

(str (cache {:a 1 :b 2} {:type :agent})) => "#cache:agent{:a 1, :b 2}"

creates a cache with the following properties

(-> (cache {} {:tag "stuff"
               :type :ref})
    (.state))
=> clojure.lang.Ref

(str (cache {:a 1 :b 2} {:type :agent}))
=> "#cache:agent{:a 1, :b 2}"
raw docstring

cache-invokeclj

(cache-invoke cache & args)

helper function for invoking the cache

helper function for invoking the cache
raw docstring

cache-stringclj

(cache-string cache)

string represetation of a cache

(str (cache {:a 1 :b 2} {:tag "stuff" :display keys})) "#stuff:atom(:a :b)"

string represetation of a cache

(str (cache {:a 1 :b 2} {:tag "stuff"
                         :display keys}))
"#stuff:atom(:a :b)"
raw docstring

defcachecljmacro

(defcache name & [doc? attrs? [type metadata :as opts?]])

defines a cache

(defcache -a-) (.state -a-) => clojure.lang.Atom

(defcache -b- [:volatile {:tag "hello"}]) (.state -b-) => volatile?

defines a cache

(defcache -a-)
(.state -a-)
=> clojure.lang.Atom

(defcache -b-
  [:volatile {:tag "hello"}])
(.state -b-)
=> volatile?
raw docstring

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

× close