You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
;; Clerk uses the hashes as filenames and only re-evaluates forms that haven't been seen before. The cache is currently using edn with `pr-str` and `read-string`.
45
+
(defrand-three
46
+
(shuffle (range3)))
47
+
48
+
;; We can look up the cache key using the var name in the hashes map.
49
+
(->> (get hashes #'how-clerk-works/rand-three)
50
+
(str".cache/")
51
+
slurp
52
+
read-string)
45
53
46
54
;; As an escape hatch, you can tag a form or var with `:clerk/no-cache` to always reevalaute it. he following form will never be cached.
47
55
^:clerk/no-cache (shuffle (range42))
48
56
49
57
;; For side effectful functions that should be cached, like a database query, you can add a value like this `#inst` to control when evaluation should happen.
0 commit comments