key « ehcache « Java Enterprise Q&A

1. cache key generation

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

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

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

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

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

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( at at - locked <0x000000079241b700> (a at at com.terracotta.toolkit.collections.ConcurrentDistributedServerMapDso.keySet( at com.terracotta.toolkit.util.ClusteredMapAggregateSet$ClusteredMapAggregateKeySet$1.getClusterMapIterator( at com.terracotta.toolkit.util.AggregateMapIterator.getNextIterator( ...