The key digests source id, source version, schema version, plan id, the
ordering contract, the freshness validators, and the authorization-scope
digest. Two identities that differ in any of those address different entries,
and the output is a hex digest, so the raw authorization scope can never
appear in it.
freshness.observedAt and freshness.staleAfter are deliberately excluded:
they describe when a producer observed the source, not what was asked
for. Keying on them would mint a new entry for every fetch and make the cache
unreadable by a caller that does not already hold the answer. Expiry is
enforced on read instead, against the record's own recorded freshness.
Deterministic cache key for one batch identity.
The key digests source id, source version, schema version, plan id, the ordering contract, the freshness validators, and the authorization-scope digest. Two identities that differ in any of those address different entries, and the output is a hex digest, so the raw authorization scope can never appear in it.
freshness.observedAtandfreshness.staleAfterare deliberately excluded: they describe when a producer observed the source, not what was asked for. Keying on them would mint a new entry for every fetch and make the cache unreadable by a caller that does not already hold the answer. Expiry is enforced on read instead, against the record's own recorded freshness.