Return-Path: Mailing-List: contact turbine-jcs-user-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list turbine-jcs-user@jakarta.apache.org Received: (qmail 29910 invoked by uid 98); 30 Dec 2002 19:07:45 -0000 X-Antivirus: nagoya (v4218 created Aug 14 2002) Received: (qmail 29891 invoked from network); 30 Dec 2002 19:07:43 -0000 Received: from daedalus.apache.org (HELO apache.org) (63.251.56.142) by nagoya.betaversion.org with SMTP; 30 Dec 2002 19:07:43 -0000 Received: (qmail 82856 invoked by uid 500); 30 Dec 2002 19:06:25 -0000 Received: (qmail 82848 invoked from network); 30 Dec 2002 19:06:25 -0000 Received: from nat01.nuasis.com (HELO sj-dc-exch02.priv.nuasis.com) (216.132.90.194) by daedalus.apache.org with SMTP; 30 Dec 2002 19:06:25 -0000 Received: by sj-dc-exch02.priv.nuasis.com with Internet Mail Service (5.5.2653.19) id ; Mon, 30 Dec 2002 11:06:30 -0800 Message-ID: From: Brett Bandy To: 'Turbine JCS Users List' Subject: RE: Disk cache persistence Date: Mon, 30 Dec 2002 11:06:22 -0800 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N There is also a problem with the way the CompositeCache is disposed of, at least when dealing with auxiliary IndexedDiskCache. CompositeCache.dispose(boolean) writes all elements from MemoryCache to auxiliary cache (via aux.update()). The aux.update() method adds elements to purgatory before writing them to the aux cache. It then immediately disposes of the auxiliary cache (aux.dispose()). The problem occurs because the doDispose() method is called before all the elements have been flushed from purgatory. There is actually a fixme comment in AbstractDiskCache.java which makes me believe the problem was found, but not dealt with. -----Original Message----- From: Brett Bandy [mailto:brett.bandy@nuasis.com] Sent: Friday, December 27, 2002 11:29 AM To: 'Turbine JCS Users List' Subject: RE: Disk cache persistence 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:james@jamestaylor.org] Sent: Monday, December 16, 2002 7:30 AM To: turbine-jcs-user@jakarta.apache.org 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: > For additional commands, e-mail: > -- To unsubscribe, e-mail: For additional commands, e-mail: -- To unsubscribe, e-mail: For additional commands, e-mail: