function Response::setStaleWhileRevalidate
Sets the number of seconds after which the response should no longer return stale content by shared caches.
This method sets the Cache-Control stale-while-revalidate directive.
@final
Return value
$this
1 call to Response::setStaleWhileRevalidate()
- Response::setCache in vendor/
symfony/ http-foundation/ Response.php - Sets the response's cache headers (validation and/or expiration).
File
-
vendor/
symfony/ http-foundation/ Response.php, line 818
Class
- Response
- Response represents an HTTP response.
Namespace
Symfony\Component\HttpFoundationCode
public function setStaleWhileRevalidate(int $value) : static {
$this->headers
->addCacheControlDirective('stale-while-revalidate', $value);
return $this;
}