server/sources/pyrorql.py
branch3.5
changeset 3043 7bcb7f1c0f46
parent 3016 5787d1cc8106
child 3527 efeb16ff93f3
--- a/server/sources/pyrorql.py	Thu Aug 27 17:03:19 2009 +0200
+++ b/server/sources/pyrorql.py	Thu Aug 27 17:04:50 2009 +0200
@@ -345,6 +345,7 @@
         cu.execute('SET %s WHERE X eid %%(x)s' % ','.join(relations),
                    kwargs, 'x')
         self._query_cache.clear()
+        entity.clear_all_caches()
 
     def delete_entity(self, session, etype, eid):
         """delete an entity from the source"""
@@ -360,6 +361,8 @@
                    {'x': self.eid2extid(subject, session),
                     'y': self.eid2extid(object, session)}, ('x', 'y'))
         self._query_cache.clear()
+        session.entity_from_eid(subject).clear_all_caches()
+        session.entity_from_eid(object).clear_all_caches()
 
     def delete_relation(self, session, subject, rtype, object):
         """delete a relation from the source"""
@@ -368,6 +371,8 @@
                    {'x': self.eid2extid(subject, session),
                     'y': self.eid2extid(object, session)}, ('x', 'y'))
         self._query_cache.clear()
+        session.entity_from_eid(subject).clear_all_caches()
+        session.entity_from_eid(object).clear_all_caches()
 
 
 class RQL2RQL(object):