From 45890d5969c0f615852c6ea28123d64e6907e043 Mon Sep 17 00:00:00 2001 From: logmanoriginal Date: Fri, 7 Oct 2016 22:56:10 +0200 Subject: [PATCH] [FileCache] Don't store folder creation status The results of the function is_dir are already cached. See http://php.net/manual/en/function.is-dir.php --- caches/FileCache.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/caches/FileCache.php b/caches/FileCache.php index 929d902..e3d86ee 100644 --- a/caches/FileCache.php +++ b/caches/FileCache.php @@ -3,7 +3,6 @@ * Cache with file system */ class FileCache extends CacheAbstract { - protected $cacheDirCreated; // boolean to avoid always chck dir cache existance public function loadData(){ $this->isPrepareCache(); @@ -75,9 +74,7 @@ class FileCache extends CacheAbstract { $cacheDir = __DIR__ . '/../cache/'; // FIXME : configuration ? // FIXME : implement recursive dir creation - if(is_null($this->cacheDirCreated) && !is_dir($cacheDir)){ - $this->cacheDirCreated = true; - + if(!is_dir($cacheDir)){ mkdir($cacheDir,0705); chmod($cacheDir,0705); }