[Zope] RAM cache invalidation

Rauch, Juergen (Juergen) juergen.rauch at optimay.com
Tue Apr 20 08:18:17 EDT 2004


Hello community,

how can all items in a RAM Cache Manager be invalidated using one single
dtml expression ?

I found a very cumbersome workaround, which is calling each cached item
in a loop like this:

<dtml-in expr="cashedItemsFolder.objectValues()">
  <dtml-let x=id>
  <dtml-var expr="'<a href=
cashedItemsFolder/'+x?ZCacheable_invalidate:method=Invalidate>'">
  </dtml-let>
  invalidate <dtml-var id></a><br>
</dtml-in>

this renders to a page that then can be retrieved via "wget" and
everyting will be invalidated. 
But this is not really the solution one would like to have.
sth like:

<dtml-call expr="myCacheManager.invalidateAll()">

would be way way better. Unfortunately this is science fiction, or is
there anything that can do this job ?


Any ideas will be appreciated,

Juergen






More information about the Zope mailing list