Query Cache will not always be invalidated (#1717)

* provide failing test, that shows missing cache invalidation

* FIX: proper cache invalidation when dependent table will be modified
This commit is contained in:
Roland Praml authored and Rob Bygrave committed 2019-05-20 20:25:18 +12:00
1 parent c6ba4d8155
commit 0cac723eac
5 files changed
+162

No files matched your search

@@ -220,6 +220,7 @@ final class BeanDescriptorCacheHelp<T> {
*/
private void queryCacheClear(CacheChangeSet changeSet) {
if (queryCache != null) {
changeSet.addInvalidate(desc);
changeSet.addClearQuery(desc);
}
}
@@ -128,6 +128,7 @@ public class BeanPersistIds implements BinaryWritable {
* Notify the cache of this event that came from another server in the cluster.
*/
public void notifyCache(CacheChangeSet changeSet) {
changeSet.addInvalidate(beanDescriptor);
changeSet.addClearQuery(beanDescriptor);
if (ids != null) {
changeSet.addBeanRemoveMany(beanDescriptor, ids);