class CacheableAjaxResponse
Same name in other branches
- 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
- 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\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\CacheView source
class CacheableAjaxResponse extends AjaxResponse implements CacheableResponseInterface {
use CacheableResponseTrait;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.