mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
#1863 - L2 cache miss on natural key cache when multiple properties that include a ManyToOne
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user