Marten::CDNCache::Rule
A single classification rule: a matcher over the request + the Policy to
apply when it matches. Build one with .path_prefix, .route_name, or
.predicate. The middleware tries rules in order; first match wins.
Constructors
new(matcher : Matcher, policy : Policy)
Matches any request whose path starts with prefix (e.g. /assets/).
Matches when the supplied block returns true for the request.
Matches a request that resolves to the handler of the named route.
Limitation: only parameterless named routes are supported (the marketing /
blog / static-page case). Routes that require parameters cannot be reversed
without them — use .path_prefix or .predicate for those.
Instance methods
policy