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

Breadcrumb

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

function FilesystemCache::generateKey

Overrides CacheInterface::generateKey

1 call to FilesystemCache::generateKey()
FilesystemCache::remove in vendor/twig/twig/src/Cache/FilesystemCache.php

File

vendor/twig/twig/src/Cache/FilesystemCache.php, line 32

Class

FilesystemCache
Implements a cache on the filesystem.

Namespace

Twig\Cache

Code

public function generateKey(string $name, string $className) : string {
    $hash = hash(\PHP_VERSION_ID < 80100 ? 'sha256' : 'xxh128', $className);
    return $this->directory . $hash[0] . $hash[1] . '/' . $hash . '.php';
}
RSS feed
Powered by Drupal