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

Breadcrumb

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

class CacheableAjaxResponse

A AjaxResponse 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 \Symfony\Component\HttpFoundation\JsonResponse extends \Symfony\Component\HttpFoundation\Response
      • class \Drupal\Core\Ajax\AjaxResponse extends \Symfony\Component\HttpFoundation\JsonResponse implements \Drupal\Core\Render\AttachmentsInterface uses \Drupal\Core\Render\AttachmentsTrait
        • class \Drupal\Core\Cache\CacheableAjaxResponse extends \Drupal\Core\Ajax\AjaxResponse implements \Drupal\Core\Cache\CacheableResponseInterface uses \Drupal\Core\Cache\CacheableResponseTrait

Expanded class hierarchy of CacheableAjaxResponse

See also

\Drupal\Core\Cache\Cache

\Drupal\Core\Cache\CacheableMetadata

\Drupal\Core\Cache\CacheableResponseTrait

File

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

Namespace

Drupal\Core\Cache
View source
class CacheableAjaxResponse extends AjaxResponse 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