Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. HeaderBag.php

function HeaderBag::addCacheControlDirective

Adds a custom Cache-Control directive.

File

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

Class

HeaderBag
HeaderBag is a container for HTTP headers.

Namespace

Symfony\Component\HttpFoundation

Code

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

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal