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

Breadcrumb

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

function Store::generateCacheKey

Generates a cache key for the given Request.

This method should return a key that must only depend on a normalized version of the request URI.

If the same URI can have more than one representation, based on some headers, use a Vary header to indicate them, and each representation will be stored independently under the same cache key.

1 call to Store::generateCacheKey()
Store::getCacheKey in vendor/symfony/http-kernel/HttpCache/Store.php
Returns a cache key for the given Request.

File

vendor/symfony/http-kernel/HttpCache/Store.php, line 428

Class

Store
Store implements all the logic for storing cache metadata (Request and Response headers).

Namespace

Symfony\Component\HttpKernel\HttpCache

Code

protected function generateCacheKey(Request $request) : string {
    return 'md' . hash('sha256', $request->getUri());
}

API Navigation

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