Install & Compatibility
Where this runs
No compatibility data collected yet for this library.
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
cachecontrol
✓ github.com/pquerna/cachecontrol
Parse Cache-Control headers from an HTTP request.
package main
import (
"fmt"
"net/http"
"github.com/pquerna/cachecontrol/cacheobject"
)
func main() {
req, _ := http.NewRequest("GET", "http://example.com", nil)
res, _ := cacheobject.ParseRequestCacheControl(req.Header.Get("Cache-Control"))
fmt.Println(res.MaxAge)
}
Debug
Known issues
No known issues recorded.
Upgrade
Version history
0.2.0latest on pkg.go.dev
Audit
Dependencies
No dependency data recorded yet.