[entropy.client.interfaces.cache/entropy.client.interfaces.dep] improve updates calculation cache item storage
This commit is contained in:
@@ -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):
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user