#1587 - Fix for propagation of @Cache(nearCache=true)

This commit is contained in:
rob bygrave
2018-12-21 02:19:21 +13:00
parent 0377e3ec5c
commit 81f42f8e95
3 changed files with 40 additions and 1 deletions
+9
View File
@@ -79,6 +79,15 @@ public class ServerCacheOptions {
copy.maxIdleSecs = maxIdleSecs;
copy.maxSecsToLive = maxSecsToLive;
copy.trimFrequency = trimFrequency;
copy.nearCache = this.nearCache;
return copy;
}
/**
* Return a copy of this object with nearCache option.
*/
public ServerCacheOptions copy(boolean nearCache) {
ServerCacheOptions copy = copy();
copy.nearCache = nearCache;
return copy;
}
@@ -132,7 +132,7 @@ class DefaultCacheHolder {
if (tuning != null) {
return new ServerCacheOptions(nearCache, tuning).applyDefaults(beanDefault);
}
return beanDefault.copy();
return beanDefault.copy(nearCache);
}
}