[entropy.cache] drop EntropyCacher.CACHE_IDS['world_update']

This commit is contained in:
Fabio Erculiani
2013-12-25 14:05:09 +01:00
parent 57e2ab5ec8
commit 3fb6905387
3 changed files with 2 additions and 7 deletions
-1
View File
@@ -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_',
+1 -3
View File
@@ -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)
+1 -3
View File
@@ -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