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

Breadcrumb

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

function Store::__construct

Constructor.

The available options are:

  • private_headers Set of response headers that should not be stored when a response is cached. (default: Set-Cookie)

Throws

\RuntimeException

File

vendor/symfony/http-kernel/HttpCache/Store.php, line 42

Class

Store
Store implements all the logic for storing cache metadata (Request and Response headers).

Namespace

Symfony\Component\HttpKernel\HttpCache

Code

public function __construct(string $root, array $options = []) {
    if (!is_dir($this->root) && !@mkdir($this->root, 0777, true) && !is_dir($this->root)) {
        throw new \RuntimeException(\sprintf('Unable to create the store directory (%s).', $this->root));
    }
    $this->keyCache = new \SplObjectStorage();
    $this->options['private_headers'] ??= [
        'Set-Cookie',
    ];
}

API Navigation

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