'\Drupal\Component\FileCache\FileCache', 'collection' => $collection, 'cache_backend_class' => NULL, 'cache_backend_configuration' => [], ]; $configuration = $configuration + $fallback_configuration; $class = $configuration['class']; return new $class(static::getPrefix(), $configuration['collection'], $configuration['cache_backend_class'], $configuration['cache_backend_configuration']); } /** * Gets the configuration used for constructing future file cache objects. * * @return array * The configuration that is used. */ public static function getConfiguration() { return static::$configuration; } /** * Sets the configuration to use for constructing future file cache objects. * * @param array $configuration * The configuration to use. */ public static function setConfiguration($configuration) { static::$configuration = $configuration; } /** * Returns the cache prefix. * * @return string * The cache prefix. */ public static function getPrefix() { return static::$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. * * @param string $prefix * The cache prefix. */ public static function setPrefix($prefix) { static::$prefix = $prefix; } }