Documentation
¶
Overview ¶
Package httpcache holds the dependency-free pieces of HTTP validator caching shared by the SPA handler and the format handlers: If-None-Match evaluation and Cache-Control construction.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CacheControl ¶
CacheControl builds the Cache-Control value of a response that is revalidated with a validator. A response that only an anonymous caller with read access to a public repository could have received may be stored by shared caches; everything else is private to the requesting client and must be revalidated on every use. maxAgeSeconds <= 0 means "always revalidate".
func ETagMatches ¶
ETagMatches reports whether an If-None-Match header value matches etag using the weak comparison RFC 9110 prescribes for If-None-Match: the W/ prefix is ignored and "*" matches any current representation. The header is a comma-separated list; a comma inside a quoted entity-tag belongs to the tag (an entity-tag has no escapes, so quotes simply pair up).
Types ¶
This section is empty.