jakarta-jcs-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Vandahl ...@apache.org>
Subject Re: Guaranteed persistence
Date Sun, 08 Aug 2010 16:11:48 GMT
On 02.08.10 10:51, Tim Stibbs wrote:
> I am looking into using JCS as a disk-based key-value store, and it seems to
> work fine. However if the jvm is terminated, the .key file may not get
> written to, and although the .data file has my data in, when I restart the
> application it cannot access anything in the cache (presumably due to the
> .key file being empty).

If you shut down your cache manager in an orderly fashion (dispose()),
the .key file will be written to disk. In a general application, a
shutdown-hook would be a good place to do this. If your application is a
web application, see
for an alternative.

Bye, Thomas.

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

View raw message