we use JCS very simply. Not distributed or anything, simply:
JCS jcs = JCS.getInstance("region-name");
I'm trying to register some kind of listener that can be used to receive a notification/event when an element is removed or expired from the cache...
I've been digging through the JCS javadoc for awhile now and I've tried:
- adding an Implementation of IElementEventHandler
to the default ElementAttributes of the cache ... it never gets called.
- using the various implementations of ICacheObserver
to register an ICacheListener
but that never gets called either. I'm not necessarily sure this point is the correct way of doing it as I think this is intended for more advanced uses of JCS ...
Does anyone know how (or if it's possible) to register some kind of listener/obsverver/whatever that will accomplish this? My final goal is to be able to be notified of when something is removed from the cache basically ... I don't particularly care about how provided it isn't a massive kludge :P