Logo Search packages:      
Sourcecode: zope-cachefu version File versions  Download package

def CacheSetup::content::caching_policy_manager::CSCachingPolicyManager::getHeadersToAddAndRemove (   self,
  content,
  view_method,
  keywords,
  time = None 
)

Return a tuple of HTTP caching headers, (headers_to_add, headers_to_remove).
   The first item is a list of headers to add to the response in the form
   (header name, header value).  The second item is a list of headers that
   should be removed (before adding).

Definition at line 49 of file caching_policy_manager.py.

00049                                                                                   :
        """Return a tuple of HTTP caching headers, (headers_to_add, headers_to_remove).
           The first item is a list of headers to add to the response in the form
           (header name, header value).  The second item is a list of headers that
           should be removed (before adding)."""
        pcs = getToolByName(self, CACHE_TOOL_ID)
        member = pcs.getMember()
        request = self.REQUEST
        (rule, header_set) = pcs.getRuleAndHeaderSet(request, content, view_method, member)
        if header_set:
            expr_context = rule._getExpressionContext(request, content, view_method, member)
            return header_set.getHeaders(expr_context)
        return ()

    #
    #   'portal_caching' interface methods


Generated by  Doxygen 1.6.0   Back to index