@@ -115,6 +115,7 @@ public class EVCacheImpl implements EVCache, EVCacheImplMBean {
115
115
private final Property <String > encoderBase ;
116
116
117
117
private final Property <Boolean > bypassAddOpt ;
118
+ private final Property <Boolean > bypassFixup ;
118
119
119
120
EVCacheImpl (String appName , String cacheName , int timeToLive , Transcoder <?> transcoder , boolean enableZoneFallback ,
120
121
boolean throwException , EVCacheClientPoolManager poolManager ) {
@@ -174,6 +175,7 @@ public class EVCacheImpl implements EVCache, EVCacheImplMBean {
174
175
175
176
// bypass short-circuit optimization
176
177
this .bypassAddOpt = propertyRepository .get (_appName + ".bypass.add.opt" , Boolean .class ).orElse (false );
178
+ this .bypassFixup = propertyRepository .get (_appName + ".bypass.fixup" , Boolean .class ).orElse (false );
177
179
178
180
// if alias changes, refresh my pool to point to the correct alias app
179
181
this .alias = propertyRepository .get ("EVCacheClientPoolManager." + appName + ".alias" , String .class );
@@ -3282,7 +3284,7 @@ public EVCacheClient[] sortClients(EVCacheClient[] clients, EVCacheClient[] writ
3282
3284
}
3283
3285
3284
3286
protected <T > EVCacheLatch add (String key , T value , Transcoder <T > tc , int timeToLive , Policy policy , EVCacheClient [] clients , int latchCount ) throws EVCacheException {
3285
- return add (key , value , tc , timeToLive , policy , clients , latchCount , true );
3287
+ return add (key , value , tc , timeToLive , policy , clients , latchCount , ! bypassFixup . get () );
3286
3288
}
3287
3289
3288
3290
protected <T > EVCacheLatch add (String key , T value , Transcoder <T > tc , int timeToLive , Policy policy , EVCacheClient [] clients , int latchCount , boolean fixup ) throws EVCacheException {
0 commit comments