views:

42

answers:

1

I store instances of Domain objects in GAE's memcache using the javax.cache API. I'd like to be notified as soon any instance is evicted due to storage limitations or anything else. Is a CacheListener the solution for that? Is GAE calling CacheListener.evict(Object o) when it's removing instance?

+3  A: 

The appengine docs state that onEvict() is not supported.

The JCache listener API is partially supported for listeners that can execute during the processing of a app's API call, such as for onPut and onRemove listeners. Listeners that require background processing, like onEvict, are not supported.

Peter Recore
Does "onPut" or "onRemove" only work locally, or also across machines (put on one machine, have the listener called on all machines)?
Thilo
Only locally. *extra text to make SO happy*
Nick Johnson