[repo] Drop cache clearing methods from the source interface
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Wed, 15 Mar 2017 08:27:45 +0100
changeset 12058 52ce05f7e9ee
parent 12057 90c40f229ab0
child 12059 72724cf53b1d
[repo] Drop cache clearing methods from the source interface Those are actually system source specific.
cubicweb/server/sources/__init__.py
cubicweb/server/test/unittest_ldapsource.py
--- a/cubicweb/server/sources/__init__.py	Wed Mar 15 08:04:58 2017 +0100
+++ b/cubicweb/server/sources/__init__.py	Wed Mar 15 08:27:45 2017 +0100
@@ -234,16 +234,6 @@
             cnxset.cnx = self.get_connection()
             cnxset.cu = cnxset.cnx.cursor()
 
-    # cache handling ###########################################################
-
-    def reset_caches(self):
-        """method called during test to reset potential source caches"""
-        pass
-
-    def clear_eid_cache(self, eid, etype):
-        """clear potential caches for the given eid"""
-        pass
-
     # user authentication api ##################################################
 
     def authenticate(self, cnx, login, **kwargs):
--- a/cubicweb/server/test/unittest_ldapsource.py	Wed Mar 15 08:04:58 2017 +0100
+++ b/cubicweb/server/test/unittest_ldapsource.py	Wed Mar 15 08:27:45 2017 +0100
@@ -277,7 +277,6 @@
             eid = cnx.execute('CWUser X WHERE X login %(login)s', {'login': 'syt'})[0][0]
             cnx.execute('SET X cw_source S WHERE X eid %(x)s, S name "system"', {'x': eid})
             cnx.commit()
-            source.reset_caches()
             rset = cnx.execute('CWUser X WHERE X login %(login)s', {'login': 'syt'})
             self.assertEqual(len(rset), 1)
             e = rset.get_entity(0, 0)