class CacheableRedirectResponse
Same name in other branches
- 8.9.x core/lib/Drupal/Core/Cache/CacheableRedirectResponse.php \Drupal\Core\Cache\CacheableRedirectResponse
- 10 core/lib/Drupal/Core/Cache/CacheableRedirectResponse.php \Drupal\Core\Cache\CacheableRedirectResponse
- 11.x core/lib/Drupal/Core/Cache/CacheableRedirectResponse.php \Drupal\Core\Cache\CacheableRedirectResponse
A RedirectResponse 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\Cache\CacheableRedirectResponse extends \Symfony\Component\HttpFoundation\RedirectResponse implements \Drupal\Core\Cache\CacheableResponseInterface uses \Drupal\Core\Cache\CacheableResponseTrait
Expanded class hierarchy of CacheableRedirectResponse
See also
\Drupal\Core\Cache\CacheableMetadata
\Drupal\Core\Cache\CacheableResponseTrait
2 files declare their use of CacheableRedirectResponse
- RedirectLeadingSlashesSubscriber.php in core/
lib/ Drupal/ Core/ EventSubscriber/ RedirectLeadingSlashesSubscriber.php - TrustedRedirectResponseTest.php in core/
tests/ Drupal/ Tests/ Core/ Routing/ TrustedRedirectResponseTest.php
File
-
core/
lib/ Drupal/ Core/ Cache/ CacheableRedirectResponse.php, line 17
Namespace
Drupal\Core\CacheView source
class CacheableRedirectResponse extends RedirectResponse implements CacheableResponseInterface {
use CacheableResponseTrait;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.