diff --git a/lib/entropy/db/__init__.py b/lib/entropy/db/__init__.py index 2e1716664..cbf5da432 100644 --- a/lib/entropy/db/__init__.py +++ b/lib/entropy/db/__init__.py @@ -538,6 +538,10 @@ class EntropyRepository(EntropyRepositoryBase): if self._db_path is None: raise AttributeError("valid database path needed") + # tracking mtime to validate repository Live cache as + # well. + self._cur_mtime = self.mtime() + # setup service interface self.__skip_checks = skipChecks @@ -738,6 +742,10 @@ class EntropyRepository(EntropyRepositoryBase): self._live_cacher.set(self._getLiveCacheKey() + key, value) def _getLiveCache(self, key): + mtime = self.mtime() + if self._cur_mtime != mtime: + self._cur_mtime = mtime + self._discardLiveCache() return self._live_cacher.get(self._getLiveCacheKey() + key) def __del__(self):