force cache clear when external entity is edited, we don't know what may occurs in external repository hooks
--- 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):