[repo cache] fix cache clearing for an eid: keys are now always a tuple stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Tue, 20 Dec 2011 09:32:27 +0100
branchstable
changeset 8133 b0a70092946a
parent 8132 460472499d6d
child 8134 7f93da785e3a
[repo cache] fix cache clearing for an eid: keys are now always a tuple
server/repository.py
--- a/server/repository.py	Mon Dec 19 19:15:49 2011 +0100
+++ b/server/repository.py	Tue Dec 20 09:32:27 2011 +0100
@@ -989,11 +989,11 @@
         for eid in eids:
             try:
                 etype, uri, extid, auri = etcache.pop(typed_eid(eid)) # may be a string in some cases
-                rqlcache.pop('%s X WHERE X eid %s' % (etype, eid), None)
+                rqlcache.pop( ('%s X WHERE X eid %s' % (etype, eid),), None)
                 extidcache.pop((extid, uri), None)
             except KeyError:
                 etype = None
-            rqlcache.pop('Any X WHERE X eid %s' % eid, None)
+            rqlcache.pop( ('Any X WHERE X eid %s' % eid,), None)
             for source in self.sources:
                 source.clear_eid_cache(eid, etype)