I've implemented a simple StringGeneratedCacheKey based on your
https://rmannibucau.wordpress.com/2015/08/21/cacheresult-jcache-cdi-to-the-rescue-of-microservices.
The only thing I did was add toString in order to make logging/debugging
easier. See:

https://github.com/sgjava/jcache-tomee/blob/master/src/main/java/com/codeferm/jcache/tomee/StringGeneratedCacheKey.java

https://github.com/sgjava/jcache-tomee/blob/master/src/main/java/com/codeferm/jcache/tomee/StringKeyGenerator.java

Then direct lookup is simple matter of:

final StringGeneratedCacheKey key = new StringGeneratedCacheKey("key1");
final String value = testCache.get(key);

Thanks Romain for the good info.




--
View this message in context: 
http://tomee-openejb.979440.n4.nabble.com/GeneratedCacheKey-tp4676068.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Reply via email to