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

def PolicyHTTPCacheManager::PolicyHTTPCacheManager::PolicyHTTPCacheManager::getCacheReport (   self  ) 

Returns the list of objects in the cache, sorted according to
the user's preferences.

Definition at line 197 of file PolicyHTTPCacheManager.py.

00197                             :
        """
        Returns the list of objects in the cache, sorted according to
        the user's preferences.
        """
        sort_by, sort_reverse = self._getSortInfo()
        c = self.ZCacheManager_getCache()
        rval = []
        for path, (hits,) in c.hit_counts.items():
            rval.append({'path': '/'.join(path),
                         'hits': hits})
        if sort_by:
            rval.sort(lambda e1, e2, sort_by=sort_by:
                      cmp(e1[sort_by], e2[sort_by]))
            if sort_reverse:
                rval.reverse()
        return rval

    def sort_link(self, name, id):


Generated by  Doxygen 1.6.0   Back to index