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

Breadcrumb

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

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\Cache

\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

... See full list

File

core/lib/Drupal/Core/Cache/CacheableResponse.php, line 17

Namespace

Drupal\Core\Cache
View source
class CacheableResponse extends Response implements CacheableResponseInterface {
    use CacheableResponseTrait;

}

API Navigation

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