Hi Jim,

I'm wondering if you can still remember the rational behind the cache code at around lines 355-387 of:


This code is pretty old (checked in 5th Dec 1997) but has started causing a few people problems under high load:


In particular:

- in line 368, why is len(cache)>max_cache/2 used as a trigger to start cache clearing? (the /2 in particular)

- does it matter that IOBTree.Bucket has gone away and that tcache is
  now a simple dictionary? It certainly seems to make the keys.reverse()
  on line 370 superfluous and the keys[-1]<t on line 371 less reliable.

More generally, do you or does anyone else have any attachment to this code or would anyone mind if I ripped it out and replaced it with something simpler, with more comments and unit tests?



Simplistix - Content Management, Zope & Python Consulting
           - http://www.simplistix.co.uk
Zope-Dev maillist  -  Zope-Dev@zope.org
**  No cross posts or HTML encoding!  **
(Related lists - http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )

Reply via email to