← back to roto on ba3a.dev

CacheKey

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.

Types

Link copied to clipboard
object Companion

Creates keys.

Properties

Link copied to clipboard

the hex digest of the stage, its version, parameters and inputs

Link copied to clipboard

the stage name, which is also the cache subfolder

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean

Equal when the stage and the hash are.

Link copied to clipboard
open override fun hashCode(): Int

Consistent with equals.

Link copied to clipboard
open override fun toString(): String

<stage>/<hash>, the entry's path under the cache.