[Zope-dev] Re: [Zope] RAM Cache Manager "next_cleanup" not working?

Júlio Dinis Silva juliodinis@hotmail.com
Wed, 18 Jul 2001 12:23:58 +0100


Hi,

>From Zope-2.3.1 CHANGES.txt:
-Fixed two mistakes in the RAM cache cleanup code.
Dont know if this was related, but I've tested the simple example
on the email below with 230, 231, 232, 233 getting the same
problem, i.e, cleanup after 5 seconds doesnt happens.

Doing a search form "ram cache" in the collector I found:
Zope Question: Cache Problem
Submitted: 2001/06/28
* * * This item is under review * * *
Anyone?

Best Regards,
Julio Dinis Silva


>From: Kevin L <kevinsl@yahoo.com>
>To: "Júlio" Dinis Silva <juliodinis@hotmail.com>, zope-dev@zope.org,  
>zope@zope.org
>Subject: Re: [Zope] RAM Cache Manager "next_cleanup" not working?
>Date: Tue, 17 Jul 2001 14:29:40 -0700 (PDT)
>
>Hi, I'm having the same problem.
>
>I have two dtml methods cached via a RAM Cache Manager. Cleanup
>Interval is set to 1800 (30 minutes), but the methods never
>expire (unless I restart zope).
>
>I'm running Zope 2.3.2 binary release on linux.
>
>any ideas?
>
>thanks
>
>-Kevin
>
>--- Júlio Dinis Silva <juliodinis@hotmail.com> wrote:
> > Hi,
> >
> > I implemented a Ram Cache Manager. I cached
> > some methods and they really get cached, but the
> > cleanup_interval
> > is not working, i.e, if I define in my Ram Cache Manager
> > a cleanup interval of 5 seconds I will not see my method's
> > cache
> > being updated after that small amount of time. Only using the
> > invalidate button of my method's cache tab I'm able to cleanup
> > and soo refresh the method's cache.
> >
> > I've been looking into the code and there is something
> > weird with StandardCacheManagers.RAMCacheManager because
> > the ZCache_set which defines the next_cleanup time, is never
> > called unless at __init__ time.
> >
> > This cache properties are well embeded into OFS.DTMLMethod and
> > OFS.DTMLDocument and so my approach to the code will
> > take some more time, but a simple test with 232 and 233 dont
> > work.
> >
> > My simple test is:
> >
> > -create a RAMCacheManager, say "mycache"
> > -create a dtml method "test1" with the code <dtml-var
> > ZopeTime>
> > -create a dtml document "test2" with the code <dtml-var
> > ZopeTime>
> > -associate test1 and test2 with "mycache"
> > -define a cleanup interval of 5 seconds and a threshold
> > entries of 1 and
> > then call "test1" and "test2" several times until more than 5
> > seconds had
> > passed.
> >
> > Isnt suppose to after 5 seconds I get a different value from
> > my method or document, in this case, a diferent zopetime?
> >
> > Is there anyone really using RAM Cache Manager with success,
> > i.e,
> > can you prove to me the cleanup_interval works? Or else there
> > must be
> > something really big I'm missing here.
> >
> > Meanwhile I'll look into the code.
> >
> > Best Regards,
> > Julio Dinis Silva
> >
> >
> >
> >
>_________________________________________________________________________
> > Get Your Private, Free E-mail from MSN Hotmail at
> > http://www.hotmail.com.
> >
> >
> > _______________________________________________
> > Zope maillist  -  Zope@zope.org
> > http://lists.zope.org/mailman/listinfo/zope
> > **   No cross posts or HTML encoding!  **
> > (Related lists -
> >  http://lists.zope.org/mailman/listinfo/zope-announce
> >  http://lists.zope.org/mailman/listinfo/zope-dev )
>
>
>__________________________________________________
>Do You Yahoo!?
>Get personalized email addresses from Yahoo! Mail
>http://personal.mail.yahoo.com/

_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.