Fix method return

This commit is contained in:
Dennis Eichhorn 2017-11-17 20:05:28 +01:00
parent a642cc0b4e
commit 875c55d877

View File

@ -143,15 +143,13 @@ class FileCache implements CacheInterface
public function set($key, $value, int $expire = -1) /* : void */ public function set($key, $value, int $expire = -1) /* : void */
{ {
if ($this->status !== CacheStatus::ACTIVE) { if ($this->status !== CacheStatus::ACTIVE) {
return false; return;
} }
// todo: allow $key to contain / as char and create subdirectory if necessary. This is important for cleaner caching. // todo: allow $key to contain / as char and create subdirectory if necessary. This is important for cleaner caching.
$path = File::sanitize($key, self::SANITIZE); $path = File::sanitize($key, self::SANITIZE);
File::put($this->cachePath . '/' . trim($path, '/') . '.cache', $this->build($value, $expire)); File::put($this->cachePath . '/' . trim($path, '/') . '.cache', $this->build($value, $expire));
return false;
} }
/** /**