Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. HttpCache.php

function HttpCache::addTraces

1 call to HttpCache::addTraces()
HttpCache::handle in vendor/symfony/http-kernel/HttpCache/HttpCache.php
Handles a Request to convert it to a Response.

File

vendor/symfony/http-kernel/HttpCache/HttpCache.php, line 128

Class

HttpCache
Cache provides HTTP caching.

Namespace

Symfony\Component\HttpKernel\HttpCache

Code

private function addTraces(Response $response) : void {
    $traceString = null;
    if ('full' === $this->options['trace_level']) {
        $traceString = $this->getLog();
    }
    if ('short' === $this->options['trace_level'] && ($masterId = array_key_first($this->traces))) {
        $traceString = implode('/', $this->traces[$masterId]);
    }
    if (null !== $traceString) {
        $response->headers
            ->add([
            $this->options['trace_header'] => $traceString,
        ]);
    }
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal