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\HttpCacheCode
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',
];
}