I think I've found a bug dealing with this issue...

jakarta-turbine-jcs/src/java/org/apache/jcs/auxiliary/disk/AbstractDiskCache
.java

the dispose() method sets the alive flag to false and then calls
doDispose().  For IndexedDiskCache.java the first thing done is to check the
alive flag:

if ( !alive )
{
    log.debug( "Not alive and dispose was called, filename: " +
        fileName );
    return;
}

Since it is always set prior to doDispose() it will always be false.  The
simple fix is to move doDispose() call (in AbstractDiskCache.java) above the
alive = false statement.

Brett

-----Original Message-----
From: James Taylor [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 16, 2002 7:30 AM
To: [EMAIL PROTECTED]
Subject: Re: Disk cache persistence


In theory: if the disk cache was disposed properly, it will
automatically re-read the key file into memory on startup, if the file
exists.

On Mon, 2002-12-16 at 10:14, Stephen Smith wrote:
> The disk auxiliary cache info page mentions:
> 
> ----------
> When the disk cache is properly shutdown, the memory index is written to 
> disk and the value file is defragmented. When the cache starts up, the 
> disk cache can be configured to read or delete the index file.
> ----------
> 
> To save the cache at shutdown I'm currently doing:
> 
> ----------
> theCache.save();
> CompositeCacheManager.getInstance().freeCache(CACHE_REGION_NAME);
> ----------
> 
> But I'm having trouble finding a reference as to how to have the disk 
> cache read in the existing file at startup time. How should this be done?
> 
> Stephen
> 
> 
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
> 


--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to