[ZCM] [ZC] 589/ 2 Reject "AcceleratedHTTPCacheManager"

"Collector: Zope Bugs, Features, and Patches ..." <[email protected]> Tue, 20 Feb 2007 13:52:13 -0500
Newsgroups gmane.comp.web.zope.devel.collector-monitor
Message-ID <[email protected]>
Issue #589 Update (Reject) "AcceleratedHTTPCacheManager"
 Status Rejected, Zope/feature+solution medium
To followup, visit:
  http://www.zope.org/Collectors/Zope/589

==============================================================
= Reject - Entry #2 by do3cc on Feb 20, 2007 1:52 pm

 Status: Pending => Rejected

If you don't want mod_proxy to cache things that have no expire header, tell him so.

According to
http://httpd.apache.org/docs/1.3/mod/mod_proxy.html

this statement would have the desired effect:

CacheDefaultExpire 0


________________________________________
= Request - Entry #1 by Dirk.Datzert on Sep 25, 2002 4:13 pm

Hi,

I found it useful if the AcceleratedHTTPCacheManager would sent a
cache-pragma of type 'no-cache' for authenticated user and objects which
should not be cached on authenticated connections.

I had configured a apache proxy and without that fix the mod_proxy will
always cache objects, regardless if the object should be cached or not !

    def ZCache_set (self,...):
        ...
        if not anon and self.anonymous_only:
            # Don't cache: Sent RESPONSE-Header to Cache !
            RESPONSE.setHeader('Cache-Control', 'no-cache')
            RESPONSE.setHeader('Expires', '-1')
            RESPONSE.setHeader('Pragma', 'no-cache')
        else:
            # Set HTTP Expires and Cache-Control headers
            seconds=self.interval
            expires=rfc1123_date(time.time() + seconds)
            RESPONSE.setHeader('Cache-Control', 'max-age=%d' % seconds)
            RESPONSE.setHeader('Expires', expires)

==============================================================