You are here

public function HeaderBag::addCacheControlDirective in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/http-foundation/HeaderBag.php \Symfony\Component\HttpFoundation\HeaderBag::addCacheControlDirective()

Adds a custom Cache-Control directive.

Parameters

string $key The Cache-Control directive name:

mixed $value The Cache-Control directive value:

File

vendor/symfony/http-foundation/HeaderBag.php, line 225

Class

HeaderBag
HeaderBag is a container for HTTP headers.

Namespace

Symfony\Component\HttpFoundation

Code

public function addCacheControlDirective($key, $value = true) {
  $this->cacheControl[$key] = $value;
  $this
    ->set('Cache-Control', $this
    ->getCacheControlHeader());
}