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

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

Return the modification time and ETag for the content object,
    view method, and keywords as the tuple (modification_time, etag,
    set_last_modified_header), where modification_time is a DateTime,
    or None.

Definition at line 75 of file caching_policy_manager.py.

00075                                                                            :
        """ Return the modification time and ETag for the content object,
            view method, and keywords as the tuple (modification_time, etag,
            set_last_modified_header), where modification_time is a DateTime,
            or None.
        """
        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)
            etag = header_set.getEtagValue(expr_context)
            mod_time = header_set.getLastModifiedValue(expr_context)
            use_mod_time = header_set.getLastModified()
            return (mod_time, etag, use_mod_time)

    security.declareProtected( permissions.View, 'getETag' )
    def getETag( self, content, view_method, keywords, time=None):


Generated by  Doxygen 1.6.0   Back to index