cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vadim Gritsenko <>
Subject Re: StoreJanitor
Date Thu, 05 Apr 2007 13:18:33 GMT
Ard Schrijvers wrote:
>> Ard Schrijvers wrote:
>>> Yes, this is exactly my point. The extra problem is that
>> the StoreJanitor
>>> never has access to the eviction policy of the cache, and
>> just starts
>>> throwing out entries "at random".
>> That's incorrect statement. I'd say that StoreJanitor always has access to
>> the eviction policy, with the exception of incorrect cache implementation,
>> such as EHCache:
>> public class EHDefaultStore implements Store {
>> public void free() { try { final List keys =
>> this.cache.getKeysNoDuplicateCheck(); if (!keys.isEmpty()) { // TODO find a
>> way to get to the LRU one. final Serializable key = (Serializable)
>> keys.get(0);
>> If you were to fix the root of the problem first, many of your other
>> troubles would simply evaporate.
> I know and have been looking before already, and have been asking around at
> the ehcache list, but there is no way you have access to the eviction policy.
> The same holds for JCSCache (I would not know for whirly cache or others)

Strictly speaking, you don't need access to the eviction policy itself - but 
only some exposed method on Store, something like 
purgeLastElementAccordingToEvictionPolicy -- can't they add something like that? 
To ehcache or jcscache, does not matter :)


View raw message