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

Breadcrumb

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

AssetControllerBase::CACHE_CONTROL

The cache control header to use.

Headers sent from PHP can never perfectly match those sent when the file is served by the filesystem, so ensure this request does not get cached in either the browser or reverse proxies. Subsequent requests for the file will be served from disk and be cached. This is done to avoid situations such as where one CDN endpoint is serving a version cached from PHP, while another is serving a version cached from disk. Should there be any discrepancy in behavior between those files, this can make debugging very difficult.

File

core/modules/system/src/Controller/AssetControllerBase.php, line 64

Class

AssetControllerBase
Defines a controller to serve asset aggregates.

Namespace

Drupal\system\Controller

Code

protected const CACHE_CONTROL = 'private, no-store';

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal