reverted: --- b/core/core.services.yml +++ a/core/core.services.yml @@ -133,7 +133,7 @@ - [setContainer, ['@service_container']] cache.backend.database: class: Drupal\Core\Cache\DatabaseBackendFactory + arguments: ['@database', '@cache_tags.invalidator.checksum'] - arguments: ['@database', '@cache_tags.invalidator.checksum', '@transliteration'] cache.backend.apcu: class: Drupal\Core\Cache\ApcuBackendFactory arguments: ['@app.root', '@cache_tags.invalidator.checksum'] diff -u b/core/lib/Drupal/Core/Cache/DatabaseBackend.php b/core/lib/Drupal/Core/Cache/DatabaseBackend.php --- b/core/lib/Drupal/Core/Cache/DatabaseBackend.php +++ b/core/lib/Drupal/Core/Cache/DatabaseBackend.php @@ -10,7 +10,6 @@ use Drupal\Component\Utility\Crypt; use Drupal\Core\Database\Connection; use Drupal\Core\Database\SchemaObjectExistsException; -use Drupal\Component\Transliteration\TransliterationInterface; /** * Defines a default cache implementation. @@ -56,18 +55,15 @@ * The database connection. * @param \Drupal\Core\Cache\CacheTagsChecksumInterface $checksum_provider * The cache tags checksum provider. - * @param \Drupal\Component\Transliteration\TransliterationInterface $transliteration - * The transliteration service. * @param string $bin * The cache bin for which the object is created. */ - public function __construct(Connection $connection, CacheTagsChecksumInterface $checksum_provider, TransliterationInterface $transliteration, $bin) { + public function __construct(Connection $connection, CacheTagsChecksumInterface $checksum_provider, $bin) { // All cache tables should be prefixed with 'cache_'. $bin = 'cache_' . $bin; $this->bin = $bin; $this->connection = $connection; - $this->transliteration = $transliteration; $this->checksumProvider = $checksum_provider; } @@ -442,12 +438,24 @@ // with the hash appended. $hash = Crypt::hashBase64($cid); if (!$cid_is_ascii) { - $cid = $this->transliteration->transliterate($cid); + $cid = $this->transliteration()->transliterate($cid); } return substr($cid, 0, 255 - strlen($hash)) . $hash; } /** + * Wraps the transliteration service. + * + * @return \Drupal\Component\Transliteration\TransliterationInterface + */ + protected function transliteration() { + if (!$this->transliteration) { + $this->transliteration = \Drupal::transliteration(); + } + return $this->transliteration; + } + + /** * Defines the schema for the {cache_*} bin tables. */ public function schemaDefinition() {