Same bug exists for removing item from aux cache.
In the same method while removing aux cache item
if ( isExpired( element ) )
{
if ( log.isDebugEnabled() )
{
log.debug( cacheName + " - Aux cache["
+ i
+ "] hit, but element
expired" );
}
missCountExpired++;
remove(element ); // should be remove(key)
element = null; :
----- Forwarded by Ankur Kumar/MEL/NMLA/NMH on 06/04/2004 04:31 PM -----
Ankur Kumar
Sent by: Ankur Kumar
06/04/2004 04:14 PM
To: "Turbine JCS Users List" <[EMAIL PROTECTED]>
cc:
Subject: Bug in Cache Element Removal when its expired
When Cache Element is expired in Memory, it should be removed from Map
object, which contains all cache elements.
But it doesn't happen. and I found the cause of it. Here is the code in
CompositeCache which tries to remove cache item if
it is expired:
protected ICacheElement get( Serializable key, boolean localOnly )
{
.............................................
if ( isExpired( element ) )
{
if ( log.isDebugEnabled() )
{
log.debug( cacheName +
" - Memory cache hit, but element
expired" );
}
missCountExpired++;
remove( element );
element = null;
}
else
{
.......................................
}
remove(element) doens't work as here key needs to be passed not the entire
element.
Can anybody fix it and release it along with disk caching fixes?
*********************************************************************************
Important Note
This email (including any attachments) contains information which is
confidential and may be subject to legal privilege. If you are not
the intended recipient you must not use, distribute or copy this
email. If you have received this email in error please notify the
sender immediately and delete this email. Any views expressed in this
email are not necessarily the views of AXA. Thank you.
*********************************************************************************