You are here

public function Response::mustRevalidate in Zircon Profile 8.0

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

Returns true if the response must be revalidated by caches.

This method indicates that the response must not be served stale by a cache in any circumstance without first revalidating with the origin. When present, the TTL of the response should not be overridden to be greater than the value provided by the origin.

Return value

bool true if the response must be revalidated by a cache, false otherwise

File

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

Class

Response
Response represents an HTTP response.

Namespace

Symfony\Component\HttpFoundation

Code

public function mustRevalidate() {
  return $this->headers
    ->hasCacheControlDirective('must-revalidate') || $this->headers
    ->hasCacheControlDirective('proxy-revalidate');
}