maxmello
09/20/2023, 8:48 AMYang Wang
09/21/2023, 3:21 PMmaxmello
09/21/2023, 3:29 PMYang Wang
09/21/2023, 3:34 PMdue to the caching, an update executed via instance A won’t be returned to a reading client connected via instance B?On that note, if instance A has a entity in the Entitycache, and that entity is subsequently updated in the DB (by instance B, or something else), then when you try to fetch that entity in the same transaction in instance A, it would be a cache-hit and return you the stale entity in the cache.
maxmello
09/22/2023, 9:30 AMYang Wang
09/25/2023, 4:44 PMmaxEntitiesToStoreInCachePerEntity
.
The usefulness of the entityCache comes when your entities have references to other entities via a foreign key.
Ie. If the referenced entity is already in the cache, then you don't need to fire another query to fetch it.
If your entity has no relationships/references, then the entityCache is probably not very useful, imo.