cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bertrand Delacretaz <>
Subject Re: [ANN] runs on Cocoon!
Date Tue, 28 Sep 2004 05:39:58 GMT
Le 28 sept. 04, à 04:12, Stefano Mazzocchi a écrit :

> Bertrand Delacretaz wrote:
>> ...The performance part comes mainly from the front-end apache2 
>> mod_cache. Simply adding the right HTTP headers and making sure the 
>> content-length header is generated as well (by setting the buffering 
>> flag on the HTML serializer) allows the front -end cache to do its 
>> job very nicely.
> uh, I might have missed that part!!! would be cool if you could 
> document that.

I'll describe this on the wiki, but basically it's only a case of 
adding the "Last-Modified"; "Expires" and "Cache-Control" headers to 
the response:

   final long lastModTime = document.lastModified().getTime();
   final long expires = System.currentTimeMillis() + 
(cacheForHowMaySeconds * 1000L);


And creating an HtmlSerializer where shouldSetContentLength() returns 
true (we should make this configurable BTW).

Also, we've been very careful to keep the whole thing stateless for 
"public" visitors. There are a few drawbacks but it allows cached pages 
to be shared between all visitors. Registering visitors and putting 
their names on pages, for example, would make a big performance 
difference in heavy traffic.

> ...What pipeline flavor are you using? what XSLT transformer?

Plain old caching pipelines, and saxon 8. I switched to saxon mostly 
because of the better error messages that it generates, didn't do any 
serious performance testing.

> ...I would have liked 50/2 better, it would have allowed me to ask for 
> 50 and maybe get a summary of the episode.

hmm...this sounds fairly right - maybe we worked a bit too fast too 
think sanely about everything ;-)

Actually does return a summary, as in that case 
there is a "50" document to keep the articles of that show together, 
but I see your point.

> ...having / instead of - wouldn't have increased your URL size ;-)

Now you're turning the knife in the wounds ;-)
So this will probably stay as big 

- Bertrand

View raw message