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

def MemcachedManager::O::aggregateIndex (   self,
  view_name,
  req,
  req_names,
  local_keys 
)

Returns the index to be used when looking for or inserting
a cache entry.
view_name is a string.
local_keys is a mapping or None.

Definition at line 18 of file __init__.py.

00018                                                                    :
        """Returns the index to be used when looking for or inserting
        a cache entry.
        view_name is a string.
        local_keys is a mapping or None.
        """
        req_index = []
        # Note: req_names is already sorted.
        for key in req_names:
            if req is None:
                val = ''
            else:
                val = req.get(key, '')
            req_index.append((str(key), str(val)))
        if local_keys:
            local_index = []
            for key, val in local_keys.items():
                local_index.append((str(key), str(val)))
            local_index.sort()
        else:
            local_index = ()
        return hash((self.h, str(view_name),
                     tuple(req_index), tuple(local_index)))

    def getEntry(self, cache, index):


Generated by  Doxygen 1.6.0   Back to index