Skip to content
Snippets Groups Projects
Commit 3bf19c0e authored by Jürg Billeter's avatar Jürg Billeter Committed by Tristan Van Berkom
Browse files

element.py: Remove unused strength parameter from _cached()

Remove unused strength parameter from _cached() and _remotely_cached(),
which makes them simple accessor functions as `__cached` is equivalent
to `__strong_cached` with a strict build plan.
parent b52ad07c
No related branches found
No related tags found
1 merge request!296Contain cache key handling in Element class
......@@ -809,17 +809,8 @@ class Element(Plugin):
# (bool): Whether this element is already present in
# the artifact cache
#
def _cached(self, strength=None):
if strength is None:
strength = _KeyStrength.STRONG if self._get_strict() else _KeyStrength.WEAK
if self.__cached is None:
return False
elif strength == _KeyStrength.STRONG:
return self.__strong_cached
else:
return self.__cached
def _cached(self):
return self.__cached
# _assert_cached()
#
......@@ -836,17 +827,8 @@ class Element(Plugin):
# (bool): Whether this element is already present in
# the remote artifact cache
#
def _remotely_cached(self, strength=None):
if strength is None:
strength = _KeyStrength.STRONG if self._get_strict() else _KeyStrength.WEAK
if self.__remotely_cached is None:
return False
elif strength == _KeyStrength.STRONG:
return self.__remotely_strong_cached
else:
return self.__remotely_cached
def _remotely_cached(self):
return self.__remotely_cached
# _tainted():
#
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment