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}")
}Вывод
*.html
pub(api) fn cacheRule(pattern: str, control: str) -> CacheRuleСложность. O(1).
С версии. 1.0.0-beta
Параметры
| Имя | Тип |
|---|---|
pattern | str |
control | str |
Возвращает
Эффекты
не объявлены (чистая, пока тело не говорит иное)
Определено в: std/web/web.oxl:93