class CacheableAjaxResponse

Same name and namespace in other branches
  1. 11.x core/lib/Drupal/Core/Cache/CacheableAjaxResponse.php \Drupal\Core\Cache\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

Expanded class hierarchy of CacheableAjaxResponse

See also

\Drupal\Core\Cache\Cache

\Drupal\Core\Cache\CacheableMetadata

\Drupal\Core\Cache\CacheableResponseTrait

1 file declares its use of CacheableAjaxResponse
PageCacheAcceptHeaderController.php in core/modules/system/tests/modules/system_test/src/Controller/PageCacheAcceptHeaderController.php

File

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

Namespace

Drupal\Core\Cache
View source
class CacheableAjaxResponse extends AjaxResponse implements CacheableResponseInterface {
  use CacheableResponseTrait;

}

Members

Title Sort descending Modifiers Object type Summary
AjaxResponse::$commands protected property The array of ajax commands.
AjaxResponse::addCommand public function Add an AJAX command to the response.
AjaxResponse::getCommands public function Gets all AJAX commands.
AttachmentsTrait::$attachments protected property The attachments for this response.
AttachmentsTrait::addAttachments public function
AttachmentsTrait::getAttachments public function
AttachmentsTrait::setAttachments public function
CacheableResponseTrait::$cacheabilityMetadata protected property The cacheability metadata.
CacheableResponseTrait::addCacheableDependency public function
CacheableResponseTrait::getCacheableMetadata public function

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.