Move Element.__*cached variable to Artifact class

Description

Currently, we are storing whether an element is cached in the Element, which is redundant when we have a perfectly good Artifact class.

Changes proposed in this merge request:

  • Artifact now has a __cached member, which is set by whatever result it gets from querying the filesystem.
  • Artifact now has an update_cached() method, which resets __cached so that the filesystem can be queried again, but only if it couldn't find anything cached (buildstream doesn't go from cached -> not cached and then query the Artifact).
  • Element no longer has or uses __strict_cached or __weak_cached

Note that these changes are built upon !1323 (closed), and should not be merged until !1323 (closed) is.

This merge request, when approved, will close: #1015 (closed)


Merge request reports

Loading