Cachefu sprinting in SorrentoΒΆ

Tags: sorrentosprint2007, plone, cachefu

The first sprint day was really a bit of an introduction day. Alec Mitchell started off with some general sprinting tips ("if you work alone, you're doing something wrong") and with a list of subjects people wanted to work on. There were a three big ones (genericsetup+xml, remember+membrane and kss) and some 8 smaller once, according to the preferences given by the participants in a pre-sprint questionaire. The suggestion was to try and join one of the smaller ones instead of swamping the big subjects.

fireworks during the dinner

In the end, I got the impression that everyone did swamp the big three :-) I myself was interested in working on one of the small ones: CacheFu improvements. The start of the sprint wasn't very structured, many people were catching up on email and stuff. I attended a good remember plus membrane presentation by Rob Miller. Afterwards I started to try out some plone 3.0 migrations of existing sites.

I had already indicated to Alec that I wanted to do CacheFu sprinting, so he came back to me in the afternoon and looked up his spreadsheet of questionaire results and hooked me up with the other person with CacheFu interest: Andrew Mleczko from Poland. At the dinner, Maciek Dziergwa also joined.

We discussed CacheFu and our various strengths. I was quite worried about the zope3 event stuff that's bound to be necessary, but Andrew thought that to be the easy part, so we're well matched together.

We aim at both plone 2.5 and 3.0 for the sprint's improvements as we want to try to improve things with events and we need 2.5's five version for that at the minimum. Probably we'll mostly work with plone 2.5, but I'm sure we'll check it works with 3.0, too.

Some of the stuff we identified that needs fixing or that could use some renewed attention in Cachefu:

Monkeypatching
CacheFu monkeypatches quite a lot. It patches the catalog to keep track of reindexes so that it can increment an internal counter. This counter is used as an indicator whether the navtree (or so) probably changed. It patches the pagetemplate and the pythonscript mechanism in order to check whether the page needs to be served at all or whether a simple "304 not modified" will suffice. All stuff that could possibly be handled with zope3 events. We hope.
ETags
CacheFu uses ETags a lot, but the build-in list of ETag components is hardcoded. It would be way handier to be able to register new etag components somewhere and have them show up in the CacheFu interface. Adapters? Zope3 utilities? I showed Andrew an example browserview where I generated ETag components. An approach like that would also allow other products to provide custom ETag components.
ETags 2
CacheFu currently doesn't look at modifications to either the default page of a folder or the chosen view on a content object. Changing this doesn't modify the catalog, so that doesn't help either. So we have to add that. (I've got some code lying around for that.)
Zope3 views
CacheFu doesn't cache zope3 views, probably because it doesn't patch the zope3 pagetemplate classes. And there are probably a couple of other reasons. Needs desperate fixing.
Unittests
Almost every CacheFu product gives one or two errors when running the tests, so that'll be a first thing that needs fixing.
Generic setup
Rocky added genericsetup support to CacheFu, which works like a charm. He only missed the last config tab of cachefu (for the memory cache), so that'll need to be added.

I looked at the bundles: there's a 2.5 and a 3.0 bundle for cachefu. The 2.5 one points at 1.0 branches, the 3.0 one at the trunk versions of the products. I don't think the next cachefu version will be 3.0-only, I'm pretty sure that a 2.5+3.0 release is the best plan.

In either case, we created a "sorrento-sprint" bundle at https://svn.plone.org/svn/collective/CacheFu/bundles/cachefu-sorrento that points at "sorrento" branches in each of the products (all copied from trunk) so that we can do our worst during this sprint without messing things up :-)

(Old imported comments)
"Zope3 views" by roberto allende on 2007-06-22 18:24:36
Where you say:

Zope3 views
CacheFu doesn't cache zope3 views...

Do you know if this has been solved yet ?, also do you know if cachefu works with formlib?

Kind Regards
r.
"CacheFu sprinting" by Geoff Davis on 2007-03-28 18:38:17
I'm glad to see that CacheFu is getting some love!

Good luck bringing it into the Zope 3 world!
 
vanrees.org logo

About me

My name is Reinout van Rees and I work a lot with Python (programming language) and Django (website framework). I live in The Netherlands and I'm happily married to Annie van Rees-Kooiman.

Weblog feeds

Most of my website content is in my weblog. You can keep up to date by subscribing to the automatic feeds (for instance with Google reader):