#1863 - L2 cache miss on natural key cache when multiple properties that include a ManyToOne

This commit is contained in:
rob bygrave
2019-11-16 17:03:34 +13:00
parent 738f19491a
commit dfefbecf44
16 changed files with 368 additions and 49 deletions
+9
View File
@@ -2,6 +2,7 @@ package io.ebean;
import io.ebean.annotation.PersistBatch;
import io.ebean.annotation.Platform;
import io.ebean.cache.ServerCacheStatistics;
import io.ebean.config.dbplatform.IdType;
import io.ebean.meta.MetaTimedMetric;
import io.ebean.meta.MetricType;
@@ -76,6 +77,10 @@ public abstract class BaseTestCase {
}
}
protected void clearAllL2Cache() {
server().getServerCacheManager().clearAll();
}
protected void resetAllMetrics() {
server().getMetaInfoManager().resetAllMetrics();
}
@@ -221,6 +226,10 @@ public abstract class BaseTestCase {
return spiEbeanServer().getBeanDescriptor(cls);
}
protected <T> ServerCacheStatistics getBeanCacheStats(Class<T> cls, boolean reset) {
return server().getServerCacheManager().getBeanCache(cls).getStatistics(reset);
}
protected Platform platform() {
return spiEbeanServer().getDatabasePlatform().getPlatform();
}