MCPcopy
hub / github.com/ory/kratos / NoCache

Function NoCache

x/nocache.go:11–13  ·  view source on GitHub ↗

NoCache adds `Cache-Control: private, no-cache, no-store, must-revalidate` to the response header.

(w http.ResponseWriter)

Source from the content-addressed store, hash-verified

9
10// NoCache adds `Cache-Control: private, no-cache, no-store, must-revalidate` to the response header.
11func NoCache(w http.ResponseWriter) {
12 w.Header().Set("Cache-Control", "private, no-cache, no-store, must-revalidate")
13}
14
15// NoCacheHandlerFunc wraps http.HandlerFunc with `Cache-Control: private, no-cache, no-store, must-revalidate` headers.
16func NoCacheHandlerFunc(handle http.HandlerFunc) http.HandlerFunc {

Callers 2

NoCacheHandlerFuncFunction · 0.85
NoCacheHandlerFunction · 0.85

Calls 2

HeaderMethod · 0.65
SetMethod · 0.45

Tested by

no test coverage detected