Fork me on GitHub
#datalevin
<
2022-10-26
>
stopa18:10:41

Hey team, noob question. I was trying to understand how Datalevin caches requests to storage. https://github.com/juji-io/datalevin/blob/6dff73783a63aff353751d30a2287aa44c3ba8ea/src/datalevin/db.cljc#L101 Do I understand correctly, that the requests are cached at the pattern level? i.e if the query engine is trying to find relevant datoms for [?a :known-attr ?v], it will fetch all tuples with :known-attr as the attribute and cache this response.

Huahai18:10:54

Currently yes

stopa18:10:18

Gotcha, thanks @U0A74MRCJ! Two follow-on questions: 1. If there’s a transaction, does it wipe the entire cache? 2. What happens if some results need to be paginated? (i.e the :known-attr tuples are too large to fit in memory)

Huahai20:10:53

2. we have an issue for that. will work on that sson.

stopa20:10:37

Awesome, thanks Huahai!

stopa21:10:24

(For context, I’m building a competitor to Firebase, and looking over Datalevin has been really helpful. Sending you a high five!)