Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CacheSatisfiesRequest ¶
func CacheSatisfiesRequest(obj *types.ObjectMetadata, req *http.Request) bool
CacheSatisfiesRequest returs whether the client allows the requested content to be retrieved from the cache and whether the cache we have is fresh enough to be used for handling the request.
func IsResponseCacheable ¶
IsResponseCacheable returs whether the upstream server allows the requested content to be saved in the cache. True result and 0 duration means that the response has no expiry date.
func ResponseExpiresIn ¶
ResponseExpiresIn parses the expiration time from upstream headers, if any, and returns it as a duration from now. If no expire time is found, it returns its second argument: the default expiration time.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.