cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ard Schrijvers" <a.schrijv...@hippo.nl>
Subject RE: StoreJanitor
Date Thu, 05 Apr 2007 13:07:16 GMT

> 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)

Ard

> 
> Vadim
> 

Mime
View raw message