Add naming for dynamic page cache and redirect module

Created on 27 August 2025, 5 days ago

I think these responses deserve special names as they are "unusual" responses that are very common. Here is some custom code from a project that doesnt use this fine module. If folks think this is useful, I can make a MR

private function getTransactionNameForResponse(Response $response) {
    if ($response->headers->get(DynamicPageCacheSubscriber::HEADER) === 'HIT') {
      return 'dynamic.cache.view';
    }
    if ($response->headers->has('X-Redirect-ID')) {
      return 'redirect.redirect';
    }
    if ($response->headers->has('X-Drupal-Route-Normalizer')) {
      return 'redirect.canonical';
    }
  }
✨ Feature request
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States moshe weitzman Boston, MA

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024