mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
#1995 - ENH: Add DatabaseConfig.isLocalOnlyL2Cache() ... to support disabling l2 cache plugins
This commit is contained in:
@@ -594,7 +594,9 @@ public class InternalConfiguration {
|
||||
}
|
||||
|
||||
private ServerCachePlugin initServerCachePlugin() {
|
||||
|
||||
if (serverConfig.isLocalOnlyL2Cache()) {
|
||||
return new DefaultServerCachePlugin();
|
||||
}
|
||||
ServerCachePlugin plugin = serverConfig.getServerCachePlugin();
|
||||
if (plugin == null) {
|
||||
ServiceLoader<ServerCachePlugin> cacheFactories = ServiceLoader.load(ServerCachePlugin.class);
|
||||
@@ -617,7 +619,7 @@ public class InternalConfiguration {
|
||||
*/
|
||||
private SpiCacheManager initCacheManager() {
|
||||
|
||||
if (!online || serverConfig.isDisableL2Cache() || serverConfig.isLocalOnlyL2Cache()) {
|
||||
if (!online || serverConfig.isDisableL2Cache()) {
|
||||
// use local only L2 cache implementation as placeholder
|
||||
return new DefaultServerCacheManager();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user