Protocol::HTTP SourceProtocolHTTPHeaderCacheControl

class CacheControl

Definitions

def must_revalidate?

Indicates that a response must not be used once it is stale. See https://www.rfc-editor.org/rfc/rfc9111.html#name-must-revalidate

Implementation

def must_revalidate?
	self.include?(MUST_REVALIDATE)
end

def proxy_revalidate?

Like must-revalidate, but for shared caches only. See https://www.rfc-editor.org/rfc/rfc9111.html#name-proxy-revalidate

Implementation

def proxy_revalidate?
	self.include?(PROXY_REVALIDATE)
end

def max_age

The maximum time, in seconds, a response should be considered fresh. See https://www.rfc-editor.org/rfc/rfc9111.html#name-max-age-2

Implementation

def max_age
	find_integer_value(MAX_AGE)
end

def s_maxage

Like max-age, but for shared caches only, which should use it before max-age when present. See https://www.rfc-editor.org/rfc/rfc9111.html#name-s-maxage

Implementation

def s_maxage
	find_integer_value(S_MAXAGE)
end