HttpResponse::setCacheControl
(PECL pecl_http:0.10.0-1.5.5)
HttpResponse::setCacheControl — Set cache control
Descrierea
static
bool HttpResponse::setCacheControl
( string $control
[, int $max_age = 0
[, bool $must_revalidate = TRUE
]] )
Define a custom Cache-Control header, usually being private or public;
Parametri
- control
-
the primary cache control setting
- max_age
-
the max-age in seconds, suggesting how long the cache entry is valid on the client side
- must_revalidate
-
whether the cached entity should be revalidated by the client for every request
Valorile întroarse
Returns TRUE on success, or FALSE if control does not match one of public, private or no-cache.
Vedeţi de asemenea
- HttpResponse::getCacheControl()
- HttpResponse::setCache()
- HttpResponse::getCache()