MCPcopy
hub / github.com/writefreely/writefreely / setCacheControl

Function setCacheControl

activitypub.go:1183–1185  ·  view source on GitHub ↗
(w http.ResponseWriter, ttl time.Duration)

Source from the content-addressed store, hash-verified

1181}
1182
1183func setCacheControl(w http.ResponseWriter, ttl time.Duration) {
1184 w.Header().Set("Cache-Control", fmt.Sprintf("public, max-age=%.0f", ttl.Seconds()))
1185}

Callers 7

fetchPostFunction · 0.85
viewCollectionPostFunction · 0.85
handleViewCollectionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected