incubator-directmemory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simone Tripodi <>
Subject Re: [jira] [Commented] (DIRECTMEMORY-60) EHCache Integration
Date Sun, 26 Feb 2012 20:50:23 GMT
> is it re containsKey method moved from DirectMemoryCache to CacheService to remove DirectMemoryCache
class, this is quite normal that you can check a key exists in a cahce. Also see map implementation
interface which essentially most caches are glorified maps, expose a method containsKey.

so why you still need a shortcut? JSR107 integration module can
comfortably use that way to check keys.

The use for a key check is potentially dangerous, as it may expire
between checking for the key, and whatever you want to do with the
stored object, and produce a race condition.

View raw message