You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When an entity is updated (merged into the persistence context) and the transaction is committed, the second level cache updates only the updated entity itself.
However, there may be other entities referencing (possibly indirectly) the updated entity. These should be evicted as well.
Now, if a Report of an audit with some findings is loaded into the cache and then a particular AuditFinding is updated directly, the audit (and report transitively) will wrongly reference a stale finding instance. Thus, it should be evicted to prevent subsequent incorrect data reads.
Note that, as can be seen from the example, this sweep should be recursive.
The text was updated successfully, but these errors were encountered:
When an entity is updated (merged into the persistence context) and the transaction is committed, the second level cache updates only the updated entity itself.
However, there may be other entities referencing (possibly indirectly) the updated entity. These should be evicted as well.
Consider the following example:
Now, if a
Report
of an audit with some findings is loaded into the cache and then a particularAuditFinding
is updated directly, the audit (and report transitively) will wrongly reference a stale finding instance. Thus, it should be evicted to prevent subsequent incorrect data reads.Note that, as can be seen from the example, this sweep should be recursive.
The text was updated successfully, but these errors were encountered: