You are here

public static function FileCacheFactory::setPrefix in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Component/FileCache/FileCacheFactory.php \Drupal\Component\FileCache\FileCacheFactory::setPrefix()

Sets the cache prefix that should be used.

Should be set to a secure, unique key to prevent cache pollution by a third party.

Parameters

string $prefix: The cache prefix.

5 calls to FileCacheFactory::setPrefix()
DrupalKernel::boot in core/lib/Drupal/Core/DrupalKernel.php
Boots the current kernel.
FileCacheFactoryTest::setUp in core/tests/Drupal/Tests/Component/FileCache/FileCacheFactoryTest.php
FileCacheFactoryTest::testGetNoPrefix in core/tests/Drupal/Tests/Component/FileCache/FileCacheFactoryTest.php
@covers ::get
FileCacheFactoryTest::testGetSetPrefix in core/tests/Drupal/Tests/Component/FileCache/FileCacheFactoryTest.php
@covers ::getPrefix @covers ::setPrefix
KernelTestBase::initFileCache in core/tests/Drupal/KernelTests/KernelTestBase.php
Initializes the FileCache component.

File

core/lib/Drupal/Component/FileCache/FileCacheFactory.php, line 103
Contains \Drupal\Component\FileCache\FileCacheFactory.

Class

FileCacheFactory
Creates a FileCache object.

Namespace

Drupal\Component\FileCache

Code

public static function setPrefix($prefix) {
  static::$prefix = $prefix;
}