Zope 2 has this thing called Cache Manager, which is useful for
caching some stuff that is expensive to compute. By default there is a
RAM Cache Manager and a Accelerated HTTP Cache Manager or
something to that effect.
Particularly nice is Django’s use of method wrappers and
decorator syntax for adding caching to random methods.
I had experimented with a very similar approach on some backend code
for Enfold Desktop (previously known as Plone Desktop), but it
wasn’t long before Mark Hammond ripped it out mercilessly. I’m not
exactly sure why he didn’t like it, it looked like a nice idea at the
time, and seeing Django came up with a similar approach makes me think
I was on the right track.
Anyway, the real subject here is that I was wondering if anyone would
be interested in a memcached Cache Manager for Zope 2, because all
the Cache Managers in Zope 2 seem to suffer from the exact same issues
that memcached claims to solve:
- Per-thread/duplicate caching
- Low hit-rate
- Several servers can’t share cached data
It would seem to me that memcached might be just the right answer to
give Zope’s Cache Managers a last breath of life before Zope 3 comes
along and rule them all.
I’m sure Geoff Davis would love the idea.