##// END OF EJS Templates
caches: use safer method of purging keys from memory dict. During some concurrency tests...
marcink -
r2931:474abf70 default
parent child Browse files
Show More
@@ -52,13 +52,15 b' class LRUMemoryBackend(memory_backend.Me'
52 super(LRUMemoryBackend, self).__init__(arguments)
52 super(LRUMemoryBackend, self).__init__(arguments)
53
53
54 def delete(self, key):
54 def delete(self, key):
55 if self._cache.has_key(key):
55 try:
56 del self._cache[key]
56 del self._cache[key]
57 except KeyError:
58 # we don't care if key isn't there at deletion
59 pass
57
60
58 def delete_multi(self, keys):
61 def delete_multi(self, keys):
59 for key in keys:
62 for key in keys:
60 if self._cache.has_key(key):
63 self.delete(key)
61 del self._cache[key]
62
64
63
65
64 class Serializer(object):
66 class Serializer(object):
General Comments 0
You need to be logged in to leave comments. Login now