RE: [Zope] RAM cache invalidation - resolved
Jonathan, you were pointing into the right direction. I wrote an external function like this: def invalidateAll( aCacheMgr, ob): aCacheMgr.ZCacheManager_getCache().ZCache_invalidate(ob) return "data has been invalidated" and I use it in a dtml-document like this: <dtml-var expr="invalidateAll( myRAMCacheManager, folderInWhichTheCashedObjectsReside )"> This seems to do the job. cheerio, Juergen -----Original Message----- From: zope-bounces@zope.org [mailto:zope-bounces@zope.org] On Behalf Of Rauch, Juergen (Juergen) Sent: 20 April 2004 17:22 To: zope@zope.org Subject: RE: [Zope] RAM cache invalidation Jonathan, I don't see how this can be done. I am using the Standard RAM Cache manager to cache the results of a couple of scripts(python). I am not writing a new Product, just using zope default components. All I want to do is invalidate all cashed results let's say with a single mouse click. The purpose of this is to give the user a possibility to refresh the view whenever he wants to. This means in between the Cache Managers cleanup_interval. May be a way to achieve this would be to set the cleanup_interval to 0 and then back to the original value. But this seems to be also a kind of sick, if it will work at all. However, thanks for your input Juergen -----Original Message----- From: Small Business Services [mailto:toolkit@magma.ca] Sent: 20 April 2004 16:26 To: Rauch, Juergen (Juergen); zope@zope.org Subject: Re: [Zope] RAM cache invalidation From: "Rauch, Juergen (Juergen)" <juergen.rauch@optimay.com>
The 'Flush Cache' tap hyperlinks to 'Control_Panel/Database/manage_cacheGC'. The StandardCacheManagers don't have a 'manage_cacheGC' function. At least I couldn't find one. I didn't really make any progress so far. May be I have to extend the interface of the RAM Cache Manager to get this working.
If you are working with python products/external methods to implement your application, could you subclass your RAM cache manager to get access to the 'manage_cacheGC' utility? Jonathan _______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
participants (1)
-
Rauch, Juergen (Juergen)