Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Response.php

function Response::mustRevalidate

Returns true if the response must be revalidated by shared caches once it has become stale.

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.

@final

File

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

Class

Response
Response represents an HTTP response.

Namespace

Symfony\Component\HttpFoundation

Code

public function mustRevalidate() : bool {
    return $this->headers
        ->hasCacheControlDirective('must-revalidate') || $this->headers
        ->hasCacheControlDirective('proxy-revalidate');
}
RSS feed
Powered by Drupal