diff --git a/lib/Data/Filesystem.php b/lib/Data/Filesystem.php index 7c921ae1..3a9bfb50 100644 --- a/lib/Data/Filesystem.php +++ b/lib/Data/Filesystem.php @@ -267,31 +267,25 @@ class Filesystem extends AbstractData */ public function setValue($value, $namespace, $key = '') { + $file = $this->_path . DIRECTORY_SEPARATOR . $namespace . '.php'; + if (function_exists('opcache_invalidate')) { + opcache_invalidate($file); + } switch ($namespace) { case 'purge_limiter': - if (function_exists('opcache_invalidate')) { - opcache_invalidate($this->_path . DIRECTORY_SEPARATOR . 'purge_limiter.php'); - } - return $this->_storeString( - $this->_path . DIRECTORY_SEPARATOR . 'purge_limiter.php', - '_storeString( - $this->_path . DIRECTORY_SEPARATOR . 'salt.php', - '_last_cache[$key] = $value; - if (function_exists('opcache_invalidate')) { - opcache_invalidate($this->_path . DIRECTORY_SEPARATOR . 'traffic_limiter.php'); - } - return $this->_storeString( - $this->_path . DIRECTORY_SEPARATOR . 'traffic_limiter.php', - '_last_cache, true) . ';' - ); + $content = '_last_cache, true) . ';'; + break; + default: + return false; } - return false; + return $this->_storeString($file, $content); } /**