[Zope-dev] RFC: ETag support for zope.browserresource

Marius Gedminas marius at gedmin.as
Tue Aug 10 16:54:21 EDT 2010


On Tue, Aug 10, 2010 at 04:49:47PM -0300, Sidnei da Silva wrote:
> On Tue, Aug 10, 2010 at 12:42 PM, Marius Gedminas <marius at gedmin.as> wrote:
> > How would you like that to be configured?
> >
> > Option #1:
> >
> >  <browser:resource/resourceDirectory etags="off" /> ?
> >
> > Option #2:
> >
> >  getMultiAdapter((resource, request), IETag).computeETag() ?
> >
> >  This is maybe a bit problematic, because the actual File object that
> >  contains all the data--such as filename--doesn't implement any
> >  interfaces.  And neither does FileResource.
> 
> So maybe Option #1?

But then it's not easily overridable, globally, for a particular
application, since each package may have its own browser:resource
declarations.

Option #3:

  IResourceETag(request).computeETag(path, timestamp, data)

Feels a bit ad-hoc.

Option #4:

  let people who want ultimate cache control use something else than
  zope.browserresource for serving static files.

Feels a bit unfriendly (but Zope 3/Bluebream is usually pretty
unfriendly...)

Marius Gedminas
-- 
http://pov.lt/ -- Zope 3/BlueBream consulting and development
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
Url : http://mail.zope.org/pipermail/zope-dev/attachments/20100810/445bec30/attachment.bin 


More information about the Zope-Dev mailing list