diff --git a/core/lib/Drupal/Core/Cache/DatabaseBackend.php b/core/lib/Drupal/Core/Cache/DatabaseBackend.php index 5e829ed..f7c7744 100755 --- a/core/lib/Drupal/Core/Cache/DatabaseBackend.php +++ b/core/lib/Drupal/Core/Cache/DatabaseBackend.php @@ -201,22 +201,22 @@ public function setMultiple(array $items) { * @see \Drupal\Core\Cache\CacheBackendInterface::setMultiple() */ public function doSetMultiple(array $items) { - $values = array(); + $values = []; - foreach ($items as $cid => $item) { - // Check if maximum expiration settings for cache bin is defined. If set, - // enforce an upper limit for the expiration to allow for garbage - // collection. - $max_expire = isset($this->configuration['max_expire']) ? $this->configuration['max_expire'] + REQUEST_TIME : Cache::PERMANENT; + // Check if maximum expiration settings for cache bin is defined. If set, + // enforce an upper limit for the expiration to allow for garbage + // collection. + $max_lifetime = isset($this->configuration['max_lifetime']) ? $this->configuration['max_lifetime'] + REQUEST_TIME : Cache::PERMANENT; + foreach ($items as $cid => $item) { $item += array( - 'expire' => $max_expire, + 'expire' => $max_lifetime, 'tags' => array(), ); // If maximum expiration is set, enforce an upper limit on the expiry. - if ($max_expire != Cache::PERMANENT && ($item['expire'] == Cache::PERMANENT || $item['expire'] > $max_expire)) { - $item['expire'] = $max_expire; + if ($max_lifetime != Cache::PERMANENT && ($item['expire'] == Cache::PERMANENT || $item['expire'] > $max_lifetime)) { + $item['expire'] = $max_lifetime; } Cache::validateTags($item['tags']); diff --git a/sites/default/default.settings.php b/sites/default/default.settings.php old mode 100644 new mode 100755 index 74cef03..4ba1366 --- a/sites/default/default.settings.php +++ b/sites/default/default.settings.php @@ -703,5 +703,5 @@ * item is requested again. */ $settings['cache_database']['render'] = [ - 'max_expire' => 86400 * 7, + 'max_lifetime' => 86400 * 7, ];