diff --git a/core/class/cache.class.php b/core/class/cache.class.php index 8d2d06d021..7ae1321c62 100644 --- a/core/class/cache.class.php +++ b/core/class/cache.class.php @@ -368,6 +368,7 @@ public static function clean() { /* * *********************Methode d'instance************************* */ public function save() { + $this->setDatetime(date('Y-m-d H:i:s')); if(config::byKey('cache::engine') == 'MariadbCache'){ return MariadbCache::save($this->getKey(),$this->getValue(),$this->getLifetime()); } @@ -376,8 +377,7 @@ public function save() { } if(config::byKey('cache::engine') == 'FileCache'){ return FileCache::save($this->getKey(),$this->getValue(),$this->getLifetime()); - } - $this->setDatetime(date('Y-m-d H:i:s')); + } if ($this->getLifetime() == 0) { return self::getCache()->save($this->getKey(), $this); } else {