This content has been marked as final.
Show 2 replies
-
1. Re: Avoiding ExternalStore.load() on cache put for new random keys
pruivo Jan 26, 2014 11:28 AM (in response to jugglingcats)Hi Alfie,
If I understood correct, you want to avoid the CacheStore lookup during a put operation, right?
If so, you may want to use this Flag.SKIP_CACHE_LOAD (check the javadoc: Flag (Infinispan Distribution 6.0.0.Final API)). Usage example:
cache.getAdvancedCache().withFlags(Flag.SKIP_CACHE_LOAD /*, you can add other flags*/).put("newKey", "newValue");
Another possible flags you may check is Flag.IGNORE_RETURN_VALUES and Flag.SKIP_REMOTE_LOOKUP.
Cheers,
Pedro
-
2. Re: Avoiding ExternalStore.load() on cache put for new random keys
jugglingcats Feb 2, 2014 7:21 PM (in response to pruivo)Perfect thank you - made a big difference!
UPDATE: for anyone stumbling across this thread, it's important to note that you should only use the return from getAdvancedCache().withFlags(Flag.IGNORE_RETURN_VALUES) for puts, and not for reading. If you use it for gets it won't attempt to read from the store and it'll be like you are just in-memory.