[entropy.client.interfaces.cache/entropy.client.interfaces.dep] improve updates calculation cache item storage

This commit is contained in:
Fabio Erculiani
2009-06-29 10:32:55 +02:00
parent 576438323e
commit 882eb3cb12
2 changed files with 3 additions and 11 deletions
+2 -7
View File
@@ -198,13 +198,8 @@ class CacheMixin:
ignore_spm_downgrades),)
disk_cache = self.Cacher.pop(c_hash)
if disk_cache != None:
try:
# workaround for old cache
if len(disk_cache['r']) == 4:
return disk_cache['r']
except (KeyError, TypeError):
return None
if isinstance(disk_cache, tuple):
return disk_cache
def get_world_update_cache_hash(self, db_digest, empty_deps,
ignore_spm_downgrades):
+1 -4
View File
@@ -1605,10 +1605,7 @@ class CalculatorsMixin:
if self.xcache:
c_hash = self.get_world_update_cache_hash(db_digest, empty_deps,
ignore_spm_downgrades)
data = {
'r': (update, remove, fine, spm_fine,),
'empty_deps': empty_deps,
}
data = (update, remove, fine, spm_fine,)
self.Cacher.push("%s%s" % (etpCache['world_update'],c_hash,),
data, async = False)