1
0
Fork 0
forked from blallo/rss-bridge

[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
This commit is contained in:
logmanoriginal 2016-10-07 22:56:10 +02:00
parent 5fdb3b2fd9
commit 45890d5969

View file

@ -3,7 +3,6 @@
* Cache with file system * Cache with file system
*/ */
class FileCache extends CacheAbstract { class FileCache extends CacheAbstract {
protected $cacheDirCreated; // boolean to avoid always chck dir cache existance
public function loadData(){ public function loadData(){
$this->isPrepareCache(); $this->isPrepareCache();
@ -75,9 +74,7 @@ class FileCache extends CacheAbstract {
$cacheDir = __DIR__ . '/../cache/'; // FIXME : configuration ? $cacheDir = __DIR__ . '/../cache/'; // FIXME : configuration ?
// FIXME : implement recursive dir creation // FIXME : implement recursive dir creation
if(is_null($this->cacheDirCreated) && !is_dir($cacheDir)){ if(!is_dir($cacheDir)){
$this->cacheDirCreated = true;
mkdir($cacheDir,0705); mkdir($cacheDir,0705);
chmod($cacheDir,0705); chmod($cacheDir,0705);
} }