Fixes: Move is_cached out of StrictCacheKey, eliminate setting
weak_cached
diff --git a/buildstream/_cachekey/cachekey.py b/buildstream/_cachekey/cachekey.py
index 3a71458..0279ba3 100644
--- a/buildstream/_cachekey/cachekey.py
+++ b/buildstream/_cachekey/cachekey.py
@@ -56,8 +56,6 @@
     def maybe_schedule_assemble(self):
         raise ImplError("CacheKey does not implement maybe_schedule_assemble()")
 
-    def is_cached(self, strength):
-        raise ImplError("CacheKey does not implement is_cached()")
 
     def tracking_done(self):
         raise ImplError("CacheKey does not implement tracking_done()")
@@ -68,6 +66,19 @@
     def assemble_done(self):
         raise ImplError("CacheKey does not implement assemble_done()")
 
+    # PUBLIC METHODS
+
+    def is_cached(self, strength):
+        if strength == _KeyStrength.STRONG:
+            return self._strong_cached
+        elif strength == _KeyStrength.STRICT:
+            # TODO: Understand difference between strict cached and strong cached
+            raise AssertionError("I have no idea why it's strong_cached and not strict_cached")
+        elif strength == _KeyStrength.WEAK:
+            return self._weak_cached
+        else:
+            raise AssertionError("Bad key strength value {}".format(strength))
+
     # PRIVATE METHODS
 
     def _update_weak_cached(self):
diff --git a/buildstream/_cachekey/strictcachekey.py b/buildstream/_cachekey/strictcachekey.py
index e984886..3ab54e3 100644
--- a/buildstream/_cachekey/strictcachekey.py
+++ b/buildstream/_cachekey/strictcachekey.py
@@ -48,11 +48,6 @@
 
         self._update_strong_cached()
 
-        # TODO: Figure out why _weak_cached is only set if it's identical
-        # NOTE: Elements with no dependencies have identical strict and weak keys.
-        if self._strict_key == self._weak_key:
-            self._update_weak_cached()
-
         self._element._check_ready_for_runtime()
 
     def get_key(self, strength):
@@ -75,17 +70,6 @@
                 not self._element._pull_pending()):
             self._element._schedule_assemble()
 
-    def is_cached(self, strength):
-        if strength == _KeyStrength.STRONG:
-            return self._strong_cached
-        elif strength == _KeyStrength.STRICT:
-            # TODO: Understand difference between strict cached and strong cached
-            raise AssertionError("I have no idea why it's strong_cached and not strict_cached")
-        elif strength == _KeyStrength.WEAK:
-            return self._weak_cached
-        else:
-            raise AssertionError("Bad key strength value {}".format(strength))
-
     def tracking_done(self):
         # this generator includes this corresponding element
         for element in self._element._reverse_deps_for_update():
@@ -96,8 +80,6 @@
         # Cache keys are already known before this.
         # Element may become cached.
         self._update_strong_cached()
-        if self._weak_key == self._strict_key:
-            self._update_weak_cached()
 
         # If it failed to pull, it should assemble.
         self._element._maybe_schedule_assemble()
@@ -106,5 +88,3 @@
         # Cache keys are already known before this.
         # Element may become cached.
         self._update_strong_cached()
-        if self._weak_key == self._strict_key:
-            self._update_weak_cached()