In this article
An ignored input merges otherwise different calls into one cache identity; exclude it only when that equivalence matches the output contract.
The tempting way to improve cache reuse
A mapped evaluator receives a model reference, a dataset shard and a report identifier. Changing the report identifier invalidates otherwise reusable element results. Excluding that metadata may be sensible. Excluding the model reference for the same reason would be a fundamentally different decision: it could reuse a score produced by another model.
The optimization question is therefore semantic. Ask which inputs can change the returned value, not which inputs change frequently. A frequently changed parameter may be central to the computation and should remain part of its identity.
Ignored inputs are removed from the key
The Cache API documents ignored_inputs as parameter names excluded from key generation. It does not independently prove those inputs are irrelevant. The author of the task is responsible for whether different values may legitimately share an output.
Trace each candidate parameter into the function’s computation and output. Even a flag named debug can affect returned diagnostics or file contents. Names alone are insufficient evidence that excluding a parameter preserves the intended result contract.
Bound arguments affect mapped elements
The caching guide explains that constant bound arguments contribute to each mapped element’s key unless excluded. A changing report identifier can therefore affect the whole mapped collection even when the actual shards are unchanged.
Keep the computational result separate from the report envelope where appropriate. A score artifact can be reused while a fresh reporting operation associates it with a new report identifier. This avoids pretending that a cached result was originally computed in the new reporting context.
Preserve the relevant candidate identity
The mapping guide describes binding constant arguments and per-item caching. For model evaluation, the bound model identity often remains semantically relevant to every element. It should not disappear merely because it is constant within one map call.
Use an artifact manifest to explain the model reference. A name such as production can move, while a resolved artifact identity describes the candidate actually scored. Excluding an unresolved moving name does not repair that ambiguity.
Validate the equivalence claim
Change only the proposed ignored input and compare fresh results under controlled conditions. Include outputs that are not part of the main score, such as diagnostic fields or generated artifact references. The full returned contract determines whether reuse is valid.
Relate the test to explicit schema contracts. A stable schema helps review outputs, but identical field names do not prove identical meaning after a computational input has been removed from cache identity.
Earn rental income from GPUs
Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.