cubicweb/devtools/__init__.py
changeset 12356 ed486562ba7e
parent 12062 601d65193619
child 12357 e385c9732f1e
--- a/cubicweb/devtools/__init__.py	Mon Oct 29 10:04:31 2018 +0100
+++ b/cubicweb/devtools/__init__.py	Fri Oct 26 17:00:05 2018 +0200
@@ -427,11 +427,12 @@
         raise ValueError('no initialization function for driver %r' % self.DRIVER)
 
     def has_cache(self, db_id):
-        """Check if a given database id exist in cb cache for the current config"""
-        cache_glob = self.absolute_backup_file('*', '*')
-        if cache_glob not in self.explored_glob:
-            self.discover_cached_db()
-        return self.db_cache_key(db_id) in self.db_cache
+        """Check if a given database id exist in db cache for the current config"""
+        key = self.db_cache_key(db_id)
+        if key in self.db_cache:
+            return True
+        self.discover_cached_db()
+        return key in self.db_cache
 
     def discover_cached_db(self):
         """Search available db_if for the current config"""