Corin, The disk cache (from my experience) will not persist over restarts in it's current form, even if you call dispose(). When last I looked the code was a bit lacking, and required a bit of refactoring to make work.
If Disk Persistence is a requirement across reboots, you might want to try my EHCachePersistant patch. It implements an EHCache Disk Store which persists across restarts. My JCS patches have the original EHCache Disk Store patched for use in JCS, so merging the two branches of development should be fairly trivial. This is, of course, one of my goals for the near-term future: Disk Persistence across restarts configurable from the cache.ccf. -Travis Savo -----Original Message----- From: Corin Moss [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 14, 2004 4:19 PM To: Turbine JCS Developers List Subject: RE: How to ensure the index is written out at shutdown? Ok, here it is.. # DEFAULT CACHE REGION jcs.default=DC jcs.default.cacheattributes=org.apache.jcs.engine.CompositeCacheAttribut es jcs.default.cacheattributes.MaxObjects=1000 jcs.default.cacheattributes.MemoryCacheName=org.apache.jcs.engine.memory .lru.LRUMemoryCache jcs.default.elementattributes.IsLateral=true # System CACHE REGION jcs.system.groupIdCache=DC jcs.system.groupIdCache.cacheattributes=org.apache.jcs.engine.CompositeC acheAttributes jcs.system.groupIdCache.cacheattributes.MaxObjects=1000 jcs.system.groupIdCache.cacheattributes.MemoryCacheName=org.apache.jcs.e ngine.memory.lru.LRUMemoryCache # PRE-DEFINED CACHE REGIONS jcs.region.main=DC jcs.region.main.cacheattributes=org.apache.jcs.engine.CompositeCacheAttr ibutes jcs.region.main.cacheattributes.MaxObjects=1000 jcs.region.main.cacheattributes.MemoryCacheName=org.apache.jcs.engine.me mory.lru.LRUMemoryCache jcs.region.main.cacheattributes.UseMemoryShrinker=true jcs.region.main.cacheattributes.MaxMemoryIdleTimeSeconds=3600 jcs.region.main.cacheattributes.ShrinkerIntervalSeconds=60 # AVAILABLE AUXILIARY CACHES jcs.auxiliary.DC=org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCacheF actory jcs.auxiliary.DC.attributes=org.apache.jcs.auxiliary.disk.indexed.Indexe dDiskCacheAttributes jcs.auxiliary.DC.attributes.DiskPath=/www/cocoon/webapps/cocoon/index-di sk-cache jcs.auxiliary.LTCP=org.apache.jcs.auxiliary.lateral.LateralCacheFactory jcs.auxiliary.LTCP.attributes=org.apache.jcs.auxiliary.lateral.LateralCa cheAttributes #jcs.auxiliary.LTCP.attributes.TransmissionTypeName=TCP #jcs.auxiliary.LTCP.attributes.TcpServers=localhost:1111 #jcs.auxiliary.LTCP.attributes.TcpListenerPort=1110 #jcs.auxiliary.LTCP.attributes.PutOnlyMode=true -----Original Message----- From: Aaron Smuts [mailto:[EMAIL PROTECTED] Sent: Thursday, 15 April 2004 11:24 a.m. To: 'Turbine JCS Developers List' Subject: RE: How to ensure the index is written out at shutdown? I think you'd have to paste in an email. > -----Original Message----- > From: Corin Moss [mailto:[EMAIL PROTECTED] > Sent: Wednesday, April 14, 2004 6:15 PM > To: Turbine JCS Developers List > Subject: RE: How to ensure the index is written out at shutdown? > > > Hi Aaron, > > I've not quite tracked down why the dispose() method isn't being called > - until then I won't know if it's now working ;) > > I've attached my ccf file as well. At this point I haven't used the > Lateral cache - but the config remains in there. > > Corin > > > > -----Original Message----- > From: Aaron Smuts [mailto:[EMAIL PROTECTED] > > Sent: Thursday, 15 April 2004 10:49 a.m. > To: 'Turbine JCS Developers List' > Subject: RE: How to ensure the index is written out at shutdown? > > > Can you send you cache.ccf file. > > > -----Original Message----- > > From: Corin Moss [mailto:[EMAIL PROTECTED] > > Sent: Wednesday, April 14, 2004 5:35 PM > > To: [EMAIL PROTECTED] > > Subject: How to ensure the index is written out at shutdown? > > > > > > > > Hi Guys, > > > > > Great to see the recent commits to CVS. I've been testing the new > code > > over the last day for use with Cocoon. I'm still unable to get the > > > index to write to disk at shutdown time. I'm not seeing any of the > > > debug information now included in the class, so I suspect we're not > > > calling the dispose methods properly. At the moment, on shut down, > the > > following is called: > > > > > m_JCS.dispose(); > > m_cacheManager.release(); > > m_JCS = null; > > m_cacheManager = null; > > m_properties = null; > > > > > Where m_JCS is an instance of: > > > > > private static class JCSCacheAccess extends GroupCacheAccess { > > private JCSCacheAccess(CompositeCache cacheControl) { > > super(cacheControl); > > } > > > > > > > > private int getSize() { > > return super.cacheControl.getSize(); > > } > > > > > > > > protected void dispose() { > > super.dispose(); > > } > > } > > } > > > > > I'm confident that these methods are being called. Is there anything > > > I'm missing here? > > > > > Thanks, > > > > > Corin > > > > > Corin Moss > > Lead Developer > > TVNZ Interactive > > > > > +64 9 916 7367 > > +64 21 403 054 > > [EMAIL PROTECTED] > > > > > > > > > > > ================================================================ > > CAUTION: This e-mail and any attachment(s) contains information that > > > is intended to be read only by the named recipient(s). It may contain > > > information that is confidential, proprietary or the subject of legal > > > privilege. This information is not to be used by any other person > > > and/or organisation. If you are not the intended recipient, please > > > advise us immediately and delete this e-mail from your system. Do not > > > use any information contained in it. > > > > > ================================================================ > > For more information on the Television New Zealand Group, visit us > > > online at http://www.tvnz.co.nz > > > ================================================================ > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: > [EMAIL PROTECTED] > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > > ================================================================ > CAUTION: This e-mail and any attachment(s) contains information that > is intended to be read only by the named recipient(s). It may contain > information that is confidential, proprietary or the subject of legal > privilege. This information is not to be used by any other person > and/or organisation. If you are not the intended recipient, please > advise us immediately and delete this e-mail from your system. Do not > use any information contained in it. > > ================================================================ > For more information on the Television New Zealand Group, visit us > online at http://www.tvnz.co.nz > ================================================================ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ================================================================ CAUTION: This e-mail and any attachment(s) contains information that is intended to be read only by the named recipient(s). It may contain information that is confidential, proprietary or the subject of legal privilege. This information is not to be used by any other person and/or organisation. If you are not the intended recipient, please advise us immediately and delete this e-mail from your system. Do not use any information contained in it. ================================================================ For more information on the Television New Zealand Group, visit us online at http://www.tvnz.co.nz ================================================================ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
