richardmaw-codethink pushed to branch master at BuildStream / buildstream
Commits:
-
55956762
by Richard Maw at 2018-09-13T16:50:33Z
-
fc7f83ac
by richardmaw-codethink at 2018-09-13T17:14:31Z
1 changed file:
Changes:
| ... | ... | @@ -200,7 +200,6 @@ class Element(Plugin): |
| 200 | 200 |
self.__strict_cache_key = None # Our cached cache key for strict builds
|
| 201 | 201 |
self.__artifacts = artifacts # Artifact cache
|
| 202 | 202 |
self.__consistency = Consistency.INCONSISTENT # Cached overall consistency state
|
| 203 |
- self.__cached = None # Whether we have a cached artifact
|
|
| 204 | 203 |
self.__strong_cached = None # Whether we have a cached artifact
|
| 205 | 204 |
self.__weak_cached = None # Whether we have a cached artifact
|
| 206 | 205 |
self.__assemble_scheduled = False # Element is scheduled to be assembled
|
| ... | ... | @@ -1126,8 +1125,6 @@ class Element(Plugin): |
| 1126 | 1125 |
|
| 1127 | 1126 |
# Query caches now that the weak and strict cache keys are available
|
| 1128 | 1127 |
key_for_cache_lookup = self.__strict_cache_key if context.get_strict() else self.__weak_cache_key
|
| 1129 |
- if not self.__cached:
|
|
| 1130 |
- self.__cached = self.__artifacts.contains(self, key_for_cache_lookup)
|
|
| 1131 | 1128 |
if not self.__strong_cached:
|
| 1132 | 1129 |
self.__strong_cached = self.__artifacts.contains(self, self.__strict_cache_key)
|
| 1133 | 1130 |
if key_for_cache_lookup == self.__weak_cache_key:
|
| ... | ... | @@ -2079,7 +2076,7 @@ class Element(Plugin): |
| 2079 | 2076 |
|
| 2080 | 2077 |
def __is_cached(self, keystrength):
|
| 2081 | 2078 |
if keystrength is None:
|
| 2082 |
- return self.__cached
|
|
| 2079 |
+ keystrength = _KeyStrength.STRONG if self._get_context().get_strict() else _KeyStrength.WEAK
|
|
| 2083 | 2080 |
|
| 2084 | 2081 |
return self.__strong_cached if keystrength == _KeyStrength.STRONG else self.__weak_cached
|
| 2085 | 2082 |
|
