You are here

public function Response::setClientTtl in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/http-foundation/Response.php \Symfony\Component\HttpFoundation\Response::setClientTtl()

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

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

Parameters

int $seconds Number of seconds:

Return value

Response

File

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

Class

Response
Response represents an HTTP response.

Namespace

Symfony\Component\HttpFoundation

Code

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