public function Response::setClientTtl

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

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

@api

Parameters

integer $seconds Number of seconds:

Return value

Response

File

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

Class

Response
Response represents an HTTP response.

Namespace

Symfony\Component\HttpFoundation

Code

public function setClientTtl($seconds) {
  $this
    ->setMaxAge($this
    ->getAge() + $seconds);
  return $this;
}