public function Response::setPrivate

Marks the response as "private".

It makes the response ineligible for serving other clients.

@api

Return value

Response

1 call to Response::setPrivate()
Response::setCache in drupal/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Response.php
Sets the response's cache headers (validation and/or expiration).

File

drupal/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Response.php, line 524

Class

Response
Response represents an HTTP response.

Namespace

Symfony\Component\HttpFoundation

Code

public function setPrivate() {
  $this->headers
    ->removeCacheControlDirective('public');
  $this->headers
    ->addCacheControlDirective('private');
  return $this;
}