$optionValue) { $methodName = 'set' . ucfirst($optionKey); if (method_exists($this, $methodName)) { $this->{$methodName}($optionValue); } else { throw new \InvalidArgumentException('Invalid cache backend option "' . $optionKey . '" for backend of type "' . static::class . '"', 1231267498); } } // Init logger. This is forces, even if $options['logger'] has been set, which shouldn't. $this->logger = GeneralUtility::makeInstance(LogManager::class)->getLogger(static::class); } public function setCache(FrontendInterface $cache): void { $this->cacheIdentifier = $cache->getIdentifier(); } /** * Sets the default lifetime for this cache backend * * @param int $defaultLifetime Default lifetime of this cache backend in seconds. If NULL is specified, the default lifetime is used. "0" means unlimited lifetime. * @internal Misused for testing purposes. * @todo: Fix tests and protect or remove */ public function setDefaultLifetime(int $defaultLifetime): void { if ($defaultLifetime < 0) { throw new \InvalidArgumentException('The default lifetime must be given as a positive integer.', 1233072774); } $this->defaultLifetime = $defaultLifetime; } }