On Tue, Aug 10, 2010 at 08:49:53AM +0800, Martin Aspeli wrote:
On 10 August 2010 02:25, Marius Gedminas <marius@gedmin.as> wrote:
I've added ETag support for zope.browserresource in a branch: http://zope3.pov.lt/trac/changeset/115596
Does anybody have any comments/objections? If not, I'd like to merge this to trunk and release zope.browserresource 3.11.0.
No strong objections, really, but bear in mind that people will likely want to customise this.
Do you have any ideas about the API for customizing this?
With plone.caching / plone.app.caching we have a framework that, among other things, deals with browser resources and sets etag, last-modified and other headers according to rules configured by the developer and/or administrator.
Is it built on top of zope.browserresource, or is it entirely independent? I've grepped the sources of both plone.caching and plone.app.caching. They don't import zope.browserresource, so I guess the answer is "wndependent", unless I'm missing something. Your next sentence leads me to think I *am* missing something:
I think that would just stomp on etags set by zope.browserresource,
but then zope.browserresource's GET handler would reject _your_ etag in its If-None-Matches header check, so there may be a problem here?
but worth bearing in mind that for bigger applications like Plone, we need a centralised, overarching and configurable strategy for cache headers.
Marius Gedminas -- http://pov.lt/ -- Zope 3/BlueBream consulting and development