[Zope] RAM Cache Manager "next_cleanup" not working?
Júlio Dinis Silva
juliodinis@hotmail.com
Tue, 17 Jul 2001 21:08:16 +0100
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.