class 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 \Symfony\Component\HttpFoundation\Response
- 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
6 files declare their use of CacheableResponse
- DefaultExceptionSubscriber.php in core/
modules/ serialization/ src/ EventSubscriber/ DefaultExceptionSubscriber.php - Feed.php in core/
modules/ views/ src/ Plugin/ views/ display/ Feed.php - FinalExceptionSubscriber.php in core/
lib/ Drupal/ Core/ EventSubscriber/ FinalExceptionSubscriber.php - ResourceResponseSubscriber.php in core/
modules/ jsonapi/ src/ EventSubscriber/ ResourceResponseSubscriber.php - ResourceResponseSubscriber.php in core/
modules/ rest/ src/ EventSubscriber/ ResourceResponseSubscriber.php
File
-
core/
lib/ Drupal/ Core/ Cache/ CacheableResponse.php, line 17
Namespace
Drupal\Core\CacheView source
class CacheableResponse extends Response implements CacheableResponseInterface {
use CacheableResponseTrait;
}