You are here

class CacheableRedirectResponse in Drupal 8

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Cache/CacheableRedirectResponse.php \Drupal\Core\Cache\CacheableRedirectResponse
  2. 10 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

Expanded class hierarchy of CacheableRedirectResponse

See also

\Drupal\Core\Cache\Cache

\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\Cache
View source
class CacheableRedirectResponse extends RedirectResponse implements CacheableResponseInterface {
  use CacheableResponseTrait;

}

Members