Generate SHA-256 ETags from the exact sparse crate index bytes served by
hosted and upstream-backed registries. Evaluate conditional requests only
after resolving the source and checking access, and retain caller-scoped
cache headers on 304 responses.
Extract the existing npm conditional-request matcher for reuse, preserving
weak comparisons, wildcard matching, lists, repeated header fields, and
If-None-Match precedence over If-Modified-Since.
Cover hosted publication and yanking, upstream refreshes and cache hits,
named registries, missing crates, and anonymous access to private indexes.
Closes https://github.com/zkochan/pnpm-tasks/issues/29.