key « ehcache « Java Enterprise Q&A





1. cache key generation    stackoverflow.com

I'm using ehcache (via the Grails plugin). The method that adds objects to the cache requires the keys to be serializable, so a typical usage would be:

def key = 22
def someObject ...

2. Ehcache Statistics by key    stackoverflow.com

I am interested in getting statistics on the Ehcache I have running.
I would like to see the number of hits/misses for a given key over a period of time. Perhaps in ...

3. Cache key organization problem    stackoverflow.com

My entity has two unique ids (yes this is wrong but it is a requirement). I want to organize a cache of such instances. The search in cache could be made ...

4. EhCache key type    stackoverflow.com

In EhCache, when adding an element to the cache :

cache.put(new Element("key1", "value1"));

// Element constructors :
Element(Object key, Object value)
I see I can give an Object as the key index. How can I use ...

5. the shortest toString as ehcache key    stackoverflow.com

I used ehcache with ehcache-spring-annotations. The first time, we choose HashCodeCacheKeyGenerator. It was pretty good. but 1 month ago we found "key duplication". So we replaced HashCodeCacheKeyGenerator with StringCacheKeyGenerator. "key duplication" issue gone, but huge ...

6. ehcache blocking on call to get keys from Terracotta cache    forums.terracotta.org

Hi , this is a very urgent request . below is a thread dump identical on every client (t1) . It is causing the cpu to skyrocket. "1135764388@qtp-1033311210-557" prio=10 tid=0x00002aaac5b0f800 nid=0x4418 in Object.wait() [0x000000005ea25000] java.lang.Thread.State: BLOCKED (on object monitor) at java.lang.Object.wait(Native Method) at java.lang.Object.wait(Object.java:485) at com.tc.object.RemoteServerMapManagerImpl.waitForResult(RemoteServerMapManagerImpl.java:133) at com.tc.object.RemoteServerMapManagerImpl.getAllKeys(RemoteServerMapManagerImpl.java:107) - locked <0x000000079241b700> (a com.tc.object.RemoteServerMapManagerImpl) at com.tc.object.TCObjectServerMapImpl.keySet(TCObjectServerMapImpl.java:332) at com.terracotta.toolkit.collections.ConcurrentDistributedServerMapDso.keySet(ConcurrentDistributedServerMapDso.java:245) at com.terracotta.toolkit.util.ClusteredMapAggregateSet$ClusteredMapAggregateKeySet$1.getClusterMapIterator(ClusteredMapAggregateSet.java:40) at com.terracotta.toolkit.util.AggregateMapIterator.getNextIterator(AggregateMapIterator.java:14) ...