You are here

public function Response::setTtl in Zircon Profile 8

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

Sets the response's time-to-live for shared caches.

This method adjusts the Cache-Control/s-maxage directive.

Parameters

int $seconds Number of seconds:

Return value

Response

File

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

Class

Response
Response represents an HTTP response.

Namespace

Symfony\Component\HttpFoundation

Code

public function setTtl($seconds) {
  $this
    ->setSharedMaxAge($this
    ->getAge() + $seconds);
  return $this;
}