2 namespace TYPO3\CMS\Core\Cache\Backend;
68 if (is_array($options) || $options instanceof \ArrayAccess) {
69 foreach ($options as $optionKey => $optionValue) {
70 $methodName =
'set' . ucfirst($optionKey);
71 if (method_exists($this, $methodName)) {
72 $this->{$methodName}($optionValue);
74 throw new \InvalidArgumentException(
'Invalid cache backend option "' . $optionKey .
'" for backend of type "' . get_class($this) .
'"', 1231267498);
87 public function setCache(\TYPO3\CMS\Core\Cache\Frontend\FrontendInterface
$cache)
90 $this->cacheIdentifier = $this->cache->getIdentifier();
104 throw new \InvalidArgumentException(
'The default lifetime must be given as a positive integer.', 1233072774);
118 if ($lifetime === self::UNLIMITED_LIFETIME || $lifetime === null && $this->defaultLifetime === self::UNLIMITED_LIFETIME) {
119 $expiryTime = new \DateTime(self::DATETIME_EXPIRYTIME_UNLIMITED,
new \DateTimeZone(
'UTC'));
121 if ($lifetime === null) {
124 $expiryTime = new \DateTime(
'now +' . $lifetime .
' seconds',
new \DateTimeZone(
'UTC'));