Cache Key
class CacheKey
Names one stage output: the stage that produced it and a hash of everything the output depends on — the stage's algorithm version, its parameters and its inputs. The same inputs and parameters always give the same key, on every machine and in every run; change any of them, or bump the version when the algorithm changes, and the key changes, so a stale output is never read back.
Inputs that are themselves stage outputs go in as their CacheKey, not their content: a key already stands for everything upstream of it, so the whole chain stays cheap to key.