SunshinePHP 2016


(PECL pecl_http >= 0.10.0)

HttpResponse::setCacheControlSet cache control


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;

Elenco dei parametri


the primary cache control setting


the max-age in seconds, suggesting how long the cache entry is valid on the client side


whether the cached entity should be revalidated by the client for every request

Valori restituiti

Returns TRUE on success, or FALSE if control does not match one of public, private or no-cache.

Vedere anche:

add a note add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top