clerk

Felipe 2025-01-22T13:05:17.923699Z

what might prevent caching of a form? I have

(def spanner-items
  [(java.time.Instant/now)
   (next.jdbc/execute! (:sql/db-datasource system) ["SELECT * FROM items WHERE sav IS NOT NULL;"])])
and my Instant changes on every clerk/show!. it doesn't for
(def savs-table
  [(java.time.Instant/now)
   (next.jdbc/execute! duckconn ["INSTALL vss"])
   (next.jdbc/execute! duckconn ["LOAD vss"])
   (next.jdbc/execute! duckconn ["CREATE TABLE IF NOT EXISTS savs (item_remote_id VARCHAR, sav FLOAT[26])"])])
my first thought is (:sql/db-datasource system) isn't being frozen correctly, but not sure how to confirm

futurile 2025-01-24T08:40:08.474769Z

You saw the ^:nextjournal.clerk/no-cache option - don't know enough to know if that will work in this instance though :-)

Felipe 2025-01-24T09:23:45.355499Z

I want the opposite. I want both forms to be cached

futurile 2025-01-24T09:29:25.971709Z

Ah, I think caching is the default. I just found a reference to defcached - https://github.com/nextjournal/clerk/blob/80c646d892d4d81a3e1b2832c713a3f50e43dbc2/src/nextjournal/clerk.clj#L386