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 this to have a "complex" key, composed of multiple int : (userId,siteId,...) instead of a string as an index ?

Thanks

10
задан Matthieu Napoli 6 May 2011 в 08:13
поделиться