3 Replies Latest reply on Apr 9, 2006 9:01 AM by Ben Wang

    Configurable PojoCache eviction policy

    Ben Wang Master

      In release 1.3 and before, we have a requirement for PojoCache that the eviction policy needs to turn on along with cacheloader (either write thru or passivation). This is needed because I don't know what to do with the CacheInterceptor that is associated with the pojo.

      In 1.4, I am thinking to alleviate this in two ways:

      1. Have a configurable flag in the xml to let user choose if no cacheloader is present, whether to go ahead and remove the interceptor. If it does, it means the pojo will be "detached" from the cache. Any further pojo operation will not be intercepted. If we leave the cache interceptor intact, we will need to map the pojo into cache again (can be slow).

      Note that this will add one flag into our existing xml.

      2. User can also subsrcribe to the preEvict event for that pojo so he knows when the pojo is detached.

      Any suggestion or objection?