public static overrideCacheControlHeaders ( string $override = null ) | ||
$override | string | One of "public", "private", "no-cache", or "no-store". (optional) |
public static function overrideCacheControlHeaders($override = null)
{
if ($override || self::isHttps()) {
Common::sendHeader('Pragma: ');
Common::sendHeader('Expires: ');
if (in_array($override, array('public', 'private', 'no-cache', 'no-store'))) {
Common::sendHeader("Cache-Control: {$override}, must-revalidate");
} else {
Common::sendHeader('Cache-Control: must-revalidate');
}
}
}
public function sendHeader() { if ($this->isJsonp()) { Common::sendHeader('Content-Type: application/javascript; charset=utf-8'); } else { Renderer\Json::sendHeaderJSON(); } ProxyHttp::overrideCacheControlHeaders(); }