From 2b556cdeaaa250bd25579fca7c7786d5a7ec7b7b Mon Sep 17 00:00:00 2001 From: James Ennis Date: Thu, 7 Mar 2019 16:46:48 +0000 Subject: _yaml_roundtrip.py: Remove YAML cache logic --- buildstream/_yaml_roundtrip.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/buildstream/_yaml_roundtrip.py b/buildstream/_yaml_roundtrip.py index 482e23bb3..47a8e22dc 100644 --- a/buildstream/_yaml_roundtrip.py +++ b/buildstream/_yaml_roundtrip.py @@ -182,13 +182,12 @@ class CompositeTypeError(CompositeError): # shortname (str): The filename in shorthand for error reporting (or None) # copy_tree (bool): Whether to make a copy, preserving the original toplevels # for later serialization -# yaml_cache (YamlCache): A yaml cache to consult rather than parsing # # Returns (dict): A loaded copy of the YAML file with provenance information # # Raises: LoadError # -def load(filename, shortname=None, copy_tree=False, *, project=None, yaml_cache=None): +def load(filename, shortname=None, copy_tree=False, *, project=None): if not shortname: shortname = filename @@ -198,13 +197,9 @@ def load(filename, shortname=None, copy_tree=False, *, project=None, yaml_cache= data = None with open(filename) as f: contents = f.read() - if yaml_cache: - data, key = yaml_cache.get(project, filename, contents, copy_tree) if not data: data = load_data(contents, file, copy_tree=copy_tree) - if yaml_cache: - yaml_cache.put_from_key(project, filename, key, data) return data except FileNotFoundError as e: -- cgit v1.2.1