Details
-
Enhancement
-
Resolution: Unresolved
-
Major
-
None
-
11.0.5.Final, 12.0.0.Dev06
-
None
-
Undefined
Description
I was recently bitten by the semantic peculiarity of the RemoteCache.withFlags(...) method.
In the embedded use case, AdvancedCache.withFlags(...) returns an AdvancedCache instance that will apply the set of flags to all cache operations. It does not modify the state of the current cache instance. Makes sense.
However, the RemoteCache.withFlags(...) method works very differently. Rather than returning a new RemoteCache instance that will applying the specified flags to all operations on that instance, the method returns the same cache instance and the specified flags are "one time use" only. This is very counter-intuitive.
Ideally, RemoteCache.withFlags(...) should work the same as AdvancedCache.withFlags(...).