Add transaction-level cache to lucid #4994
m-i-c-h-a-l
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
In JPA (Hibernate, etc.), there is a transaction-level cache, also known as the L1 cache. When the same record is loaded by its ID twice within the same database transaction, the second load is served from the local cache bound to that transaction instead of being fetched from the database. This can significantly improve performance in certain scenarios.
Of course, it’s possible to implement similar behavior manually, but it usually requires adding chunks of boilerplate code. It would be great to have this feature built directly into Lucid.
Beta Was this translation helpful? Give feedback.
All reactions