Documentation ¶
Index ¶
Constants ¶
View Source
const ( // REQ The client is unwilling to accept a response whose age is greater than the specified number of seconds. // RES The response is to be considered stale after its age is greater than the specified number of seconds. DirectiveMaxAge = "max-age" // REQ The client is willing to accept a response whose freshness lifetime is no less than its current age plus the specified time in seconds. // The client wants a response that will still be fresh for at least the specified number of seconds. DirectiveMinFresh = "min-fresh" // REQ/RES The cache MUST NOT store any part of either this request or any response to it. DirectiveNoStore = "no-store" // REQ/RES The cache MUST NOT use a stored response to satisfy the request. DirectiveNoCache = "no-cache" // RES The cache MAY store the response, even if the response would normally be non-cacheable. DirectivePublic = "public" )
View Source
const ( MaxTTL = time.Minute * 5 DefaultTTL = time.Minute * 1 )
Variables ¶
This section is empty.
Functions ¶
func Enable ¶
func Enable(cache Cache) httpcli.HandlerFunc
Types ¶
Click to show internal directories.
Click to hide internal directories.