This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-11-09
Channels
- # announcements (14)
- # architecture (42)
- # babashka (23)
- # beginners (37)
- # biff (8)
- # calva (2)
- # cider (3)
- # clara (42)
- # clerk (14)
- # clojure (55)
- # clojure-brasil (3)
- # clojure-dev (5)
- # clojure-europe (18)
- # clojure-hungary (88)
- # clojure-losangeles (3)
- # clojure-nl (1)
- # clojure-norway (66)
- # clojure-uk (9)
- # clojurescript (16)
- # core-logic (16)
- # datomic (6)
- # fulcro (32)
- # hyperfiddle (25)
- # instaparse (12)
- # joyride (2)
- # lsp (13)
- # malli (15)
- # off-topic (50)
- # polylith (11)
- # portal (3)
- # re-frame (2)
- # reitit (2)
- # sci (8)
- # shadow-cljs (16)
- # tools-deps (13)
- # xtdb (5)
@taylor.jeremydavid How does caching work in XTDB? If we have:
(def node (xt/new-api-client "url:5511"))
(def db (xt/db node))
(xt/q db '{:find [e] :where [[e :xt/id id]]})
(xt/q db '{:find [e] :where [[e :xt/id id]]})
(xt/q db '{:find [e] :where [[e :xt/id id]]})
(xt/q db '{:find [e] :where [[e :xt/id id]]})
Do the calls get cached in the client at all?Hey @U0HJD63RN there's no caching at the client level so each of these will execute independently, in full. Caching that does happen across the queries though:
1. RocksDB will keep recently used pages in memory
2. There's an entity cache attached to the db
which will short circuit some of the internal temporal version lookups, also "LRU" based
3. The query is compiled and cached so the Datalog won't be being parsed each time (although this saving is minuscule in the scheme of things, especially if you have any kind of network latency)