From 3fb69053878925186c2a6feb3dd58748d59bee2b Mon Sep 17 00:00:00 2001 From: Fabio Erculiani Date: Wed, 25 Dec 2013 14:05:09 +0100 Subject: [PATCH] [entropy.cache] drop EntropyCacher.CACHE_IDS['world_update'] --- lib/entropy/cache.py | 1 - lib/entropy/client/interfaces/dep.py | 4 +--- lib/entropy/client/interfaces/methods.py | 4 +--- 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/lib/entropy/cache.py b/lib/entropy/cache.py index b94791d54..120fd8f5f 100644 --- a/lib/entropy/cache.py +++ b/lib/entropy/cache.py @@ -40,7 +40,6 @@ class EntropyCacher(Singleton): 'dep_tree': 'deptree/dep_tree_', 'atom_match': 'atom_match/atom_match_', 'atom_search': 'atom_search/atom_search_', - 'world_update': 'world_update/world_cache_', 'check_package_update': 'check_update/package_update_', 'depends_tree': 'depends/depends_tree_', 'filter_satisfied_deps': 'depfilter/filter_satisfied_deps_', diff --git a/lib/entropy/client/interfaces/dep.py b/lib/entropy/client/interfaces/dep.py index 90567f8da..18c87b003 100644 --- a/lib/entropy/client/interfaces/dep.py +++ b/lib/entropy/client/interfaces/dep.py @@ -3087,9 +3087,7 @@ class CalculatorsMixin: sha = hashlib.sha1() sha.update(const_convert_to_rawstring(cache_s)) - cache_key = "%s%s" % ( - EntropyCacher.CACHE_IDS['world_update'], - sha.hexdigest(),) + cache_key = "updates/%s_v1" % (sha.hexdigest(),) if use_cache and self.xcache: cached = self._cacher.pop(cache_key) diff --git a/lib/entropy/client/interfaces/methods.py b/lib/entropy/client/interfaces/methods.py index 5ca35d202..bae94cbd9 100644 --- a/lib/entropy/client/interfaces/methods.py +++ b/lib/entropy/client/interfaces/methods.py @@ -341,8 +341,6 @@ class RepositoryMixin: updated = False if updated: self._cacher.discard() - EntropyCacher.clear_cache_item( - EntropyCacher.CACHE_IDS['world_update']) return conn def add_repository(self, repository_metadata): @@ -446,7 +444,7 @@ class RepositoryMixin: # also early remove from _enabled_repos to avoid # issues when reloading SystemSettings which is bound to # Entropy Client SystemSettings plugin, which - # triggers calculate_world_updates, + # triggers calculate_updates, # which triggers _all_repositories_hash, which triggers # open_repository, which triggers _load_repository, # which triggers an unwanted