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

Breadcrumb

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

function Response::setClientTtl

Sets the response's time-to-live for private/client caches in seconds.

This method adjusts the Cache-Control/max-age directive.

@final

Return value

$this

File

vendor/symfony/http-foundation/Response.php, line 884

Class

Response
Response represents an HTTP response.

Namespace

Symfony\Component\HttpFoundation

Code

public function setClientTtl(int $seconds) : static {
    $this->setMaxAge($this->getAge() + $seconds);
    return $this;
}
RSS feed
Powered by Drupal