W3cubDocs

/Drupal 8

public static function FileCacheFactory::setPrefix

public static FileCacheFactory::setPrefix($prefix)

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.

File

core/lib/Drupal/Component/FileCache/FileCacheFactory.php, line 98

Class

FileCacheFactory
Creates a FileCache object.

Namespace

Drupal\Component\FileCache

Code

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

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Component!FileCache!FileCacheFactory.php/function/FileCacheFactory::setPrefix/8.1.x