[Zope-dev] [Checkins] SVN: zope.app.publisher/trunk/ To makebrowsers update their caches of resources immediately when the

Roger Ineichen dev at projekt01.ch
Tue Jun 9 10:50:48 EDT 2009


Hi all

> Betreff: Re: [Zope-dev] [Checkins] SVN: 
> zope.app.publisher/trunk/ To makebrowsers update their caches 
> of resources immediately when the
> 
> On Tuesday 09 June 2009, Wolfgang Schnerring wrote:
> >   To make browsers update their caches of resources 
> immediately when 
> > the
> >   resource changes, the absolute URLs of resources can now 
> be made to 
> > contain a hash of the resource's contents, so it will look like
> >   /++noop++12345/@@/myresource instead of /@@/myresource.
> >  
> >   - Implemented an AbsoluteURL adapter that computes a hash of the 
> > resource's contents and inserts that into the URL. - Content hashes 
> > will be cached in memory, except when in developer mode - 
> Introduced a 
> > ++noop++ traverser that simply throws away the path segment 
> - Wrote a 
> > bit of documentation about resources
> 
> Mmmh, this looks like a lot of extra code to get behavior 
> that is served better with different tools. Have you looked 
> at z3c.versionedresource and z3c.traverser? Both of those 
> should solve these type of use cases well.

Serving resources from a Zope server and caching them for 
speedup is not the best pattern. I recommend to use a 
content delivery network concept and off load the resource
traffic from zope at all.

And as stephan suggested, using the same name for a changed
resource is a bad thing. This implementation seems to me like
a workarround for serving the same url for changed resources.
I also recommend to use different resource names for different
resource versions. z3c.versionedresource offers such a concept.

anyway, I whould be happy if we do not implement such high
level feature in zope core packages. Because there are
1000 different concepts to do it right. Why did you not use
an additional package?

Regards
Roger Ineichen



More information about the Zope-Dev mailing list