pmb.helpers.repo.update: refactor cache code (!1726)

Change the cache format from args.cache["offline_msg_shown"] to
args.cache["pmb.helpers.repo.update"]["offline_msg_shown"]. This is in
preparation for saving more data in the cache of
pmb.helpers.repo.update in the next commit.
This commit is contained in:
Oliver Smith 2018-12-11 07:40:43 +01:00
parent a874baa037
commit fa7860c8f6
2 changed files with 6 additions and 4 deletions

View file

@ -130,15 +130,16 @@ def add_shortcuts(args):
def add_cache(args):
""" Add a caching dict (caches parsing of files etc. for the current
session) """
repo_update = {"offline_msg_shown": False}
setattr(args, "cache", {"apkindex": {},
"apkbuild": {},
"apk_min_version_checked": [],
"apk_repository_list_updated": [],
"built": {},
"find_aport": {},
"offline_msg_shown": False,
"pmb.helpers.package.depends_recurse": {},
"pmb.helpers.package.get": {}})
"pmb.helpers.package.get": {},
"pmb.helpers.repo.update": repo_update})
def add_deviceinfo(args):