fn cacheRule
A Cache-Control rule: files whose path matches pattern (a glob with at most one *) are served with control.
Example:
use std.web { cacheRule }
fn main() io {
let r = cacheRule("*.html", "no-cache")
print("{r.pattern}")
}Output
*.html
pub(api) fn cacheRule(pattern: str, control: str) -> CacheRuleComplexity. O(1).
Since. 1.0.0-beta
Parameters
| Name | Type |
|---|---|
pattern | str |
control | str |
Returns
Effects
none declared (pure unless the body says otherwise)
Defined in: std/web/web.oxl:93