Marten::CDNCache::Policy
An immutable description of how a response should be cached.
visibility is :public (CDN-cacheable) or :private. A private policy
with no max_age renders as private, no-store — the conservative default.
strip_cookies is only ever honored by the middleware on public responses.
Constants
VALID_VISIBILITIES = {:public, :private}
Constructors
A long-lived immutable asset policy (content-fingerprinted files).
private_no_store
The conservative default: not cacheable anywhere.
Instance methods
cache_control_header
Renders the Cache-Control header value for this policy.
immutable
max_age
public?
s_maxage
serialize
Compact serialization used to carry a handler-selected policy through an
internal response header (see Cacheable/Uncacheable). Never sent to
the client — the middleware deletes the header after reading it.
strip_cookies
visibility