class CacheableResponse
Same name in other branches
- 8.9.x core/lib/Drupal/Core/Cache/CacheableResponse.php \Drupal\Core\Cache\CacheableResponse
- 10 core/lib/Drupal/Core/Cache/CacheableResponse.php \Drupal\Core\Cache\CacheableResponse
- 11.x core/lib/Drupal/Core/Cache/CacheableResponse.php \Drupal\Core\Cache\CacheableResponse
A response that contains and can expose cacheability metadata.
Supports Drupal's caching concepts: cache tags for invalidation and cache contexts for variations.
Hierarchy
- class \Drupal\Core\Cache\CacheableResponse extends \Symfony\Component\HttpFoundation\Response implements \Drupal\Core\Cache\CacheableResponseInterface uses \Drupal\Core\Cache\CacheableResponseTrait
Expanded class hierarchy of CacheableResponse
See also
\Drupal\Core\Cache\CacheableMetadata
\Drupal\Core\Cache\CacheableResponseTrait
11 files declare their use of CacheableResponse
- DefaultExceptionSubscriber.php in core/
modules/ serialization/ src/ EventSubscriber/ DefaultExceptionSubscriber.php - DefaultFormatTestController.php in core/
modules/ system/ tests/ modules/ default_format_test/ src/ DefaultFormatTestController.php - DynamicPageCacheTestController.php in core/
modules/ dynamic_page_cache/ tests/ dynamic_page_cache_test/ src/ DynamicPageCacheTestController.php - Feed.php in core/
modules/ views/ src/ Plugin/ views/ display/ Feed.php - PageCacheAcceptHeaderController.php in core/
modules/ system/ tests/ modules/ system_test/ src/ Controller/ PageCacheAcceptHeaderController.php
File
-
core/
lib/ Drupal/ Core/ Cache/ CacheableResponse.php, line 17
Namespace
Drupal\Core\CacheView source
class CacheableResponse extends Response implements CacheableResponseInterface {
use CacheableResponseTrait;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.