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

Breadcrumb

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

function HttpCache::getTraceKey

Calculates the key we use in the "trace" array for a given request.

File

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

Class

HttpCache
Cache provides HTTP caching.

Namespace

Symfony\Component\HttpKernel\HttpCache

Code

private function getTraceKey(Request $request) : string {
    $path = $request->getPathInfo();
    if ($qs = $request->getQueryString()) {
        $path .= '?' . $qs;
    }
    try {
        return $request->getMethod() . ' ' . $path;
    } catch (SuspiciousOperationException) {
        return '_BAD_METHOD_ ' . $path;
    }
}

API Navigation

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