OxL Справочник OxL
РусскийEnglish

fn cacheRule

A Cache-Control rule: files whose path matches pattern (a glob with at most one *) are served with control.

Example:

oxl✓ проверяется в CI
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

Параметры

ИмяТип
patternstr
controlstr

Возвращает

CacheRule

Эффекты

не объявлены (чистая, пока тело не говорит иное)

Определено в: std/web/web.oxl:93

См. также