[Twisted-web] Cache-friendly Nevow pages

Mary Gardiner mary-twisted at puzzling.org
Sat Aug 7 23:26:03 MDT 2004

On Sat, Aug 07, 2004, Mary Gardiner wrote:
>  2. generate the ETag header based on a hash of page contents
>    Pros: As best I can tell, this is how the ETag header is really meant
>    to be generated, ideally it signals octect equality and should change
>    if, for example, Nevow for some reason starts pretty-printing output.
>    Cons: rend.Page.renderHTTP seems to make this really hard --
>    even if you set the bufferedflag = True, rend.Page.afterRender
>    doesn't seem to have any way to access the result of the render.

The attached seems to do what I want here, I'll be interested to hear
about what horrors I am inflicting upon myself by doing this.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: etag.py
Type: text/x-python
Size: 476 bytes
Desc: not available
Url : http://pyramid.twistedmatrix.com/pipermail/twisted-web/attachments/20040808/7f490116/etag.py

More information about the Twisted-web mailing list