data CacheRule
Cache-Control for the paths that match pattern: a glob with at most one * (assets/*, *.html, *).
Example:
use std.web { CacheRule, cacheRule }
fn main() io {
let r: CacheRule = cacheRule("assets/*", "public, max-age=31536000, immutable")
print("{r.pattern} -> {r.control}")
}Output
assets/* -> public, max-age=31536000, immutable
@derive(Clone)
pub(api) data CacheRuleThread safety. an immutable value; safe to share.
Since. 1.0.0-beta
Fields
pub(api) pattern: str | A glob with at most one |
pub(api) control: str | The |
Defined in: std/web/web.oxl:69