jakarta-jcs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Wolf <Eric.W...@bcbsks.com>
Subject Re: disk caching persistence
Date Fri, 16 Mar 2007 21:27:31 GMT
Aaron Smuts <asmuts <at> yahoo.com> writes:

> 
> I'm not sure what the question is exactly.  Can you
> clarify?
> 
> Aaron
> 
> --- Thomas Vandahl <tv <at> apache.org> wrote:
> 
> > 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.
> > 

The two part question that started this thread is as follows:

In the JCS documentation, it is stated:

Persistence
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. This provides an unreliable 
persistence mechanism. 

I wanted to know how to make "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 couldn't 
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.  If you could show me how to do that, I would greatly appreciate it.

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


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