Documentation
¶
Overview ¶
Cache Control is a package to provide a flexible control over Cache-Control header.
Please note, this package is not going to cover all the Cache-Control functionality.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultPage = &Configuration{ Type: zen.Ptr(Public), MaxAge: zen.Ptr(0 * time.Hour), SMaxAge: zen.Ptr(12 * time.Hour), }
View Source
var DefaultStatic = &Configuration{ Type: zen.Ptr(Public), MaxAge: zen.Ptr(12 * time.Hour), }
Functions ¶
func MiddlewarePage ¶
func MiddlewarePage(next http.HandlerFunc, control *Configuration) http.HandlerFunc
func Set ¶
func Set(w http.ResponseWriter, r *http.Request, control *Configuration)
Set writes a cache-control header according to provided configuration. Prints warnings about conflicts and misuses.
Types ¶
Click to show internal directories.
Click to hide internal directories.