jakarta-jcs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Vandahl ...@apache.org>
Subject Re: disk caching persistence
Date Thu, 15 Mar 2007 10:03:52 GMT
Eric Wolf wrote:
> I wanted to know how to "the disk cache can be configured to read or delete
> the index file".  I wanted to set it to read to use caching as a way to
> have my application functional while off-line of the databases.  I could not 
> find how to do this anywhere in the documentation.  The "DiskUsagePattern"
> seems to hint about it if you set it to UPDATE, but that only forces things
> to disk.  It doesn't mention configuring the disk cache to read the index
> file at start up.  Does someone know how to do this?

The code of the IndexedDiskCache suggests that the index file is being
read if it exists and is not corrupted. I can see no configuration
setting for this.

> Secondary question: How do you make sure of shutting down the disk cache
> properly?

The IndexedDiskCache registers a Shutdown Hook with the runtime. So the
dispose() method should be run at JVM exit the latest. In every other
case if all managers associated with this cache call release(), the
cache is disposed. During dispose() data files are (optionally)
optimized and the key file is written.

Bye, Thomas.

---------------------------------------------------------------------
To unsubscribe, e-mail: jcs-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jcs-dev-help@jakarta.apache.org


Mime
View raw message