src/Cache.php
public function flush()
        {
            if (!$this->enabled) return;

            switch ($this->type) {
                case self::TYPE_FILE:
                    $iterator = new \DirectoryIterator($this->path);
                    foreach ($iterator as $file_info)
                    {
                        if (!$file_info->isDir())
                        {
                            unlink($file_info->getPathname());
                        }
                    }
            }
        }
public function flush()
        {
            if (!$this->enabled) return;

            switch ($this->type) {
                case self::TYPE_FILE:
                    $iterator = new \DirectoryIterator($this->path);
                    foreach ($iterator as $file_info)
                    {
                        if (!$file_info->isDir())
                        {
                            unlink($file_info->getPathname());
                        }
                    }
            }
        }
public function flush ( ) { if ( ! $ this -> enabled ) return ; switch ( $ this -> type ) { case self :: TYPE_FILE : $ iterator = new \ DirectoryIterator ( $ this -> path ) ; foreach ( $ iterator as $ file_info ) { if ( ! $ file_info -> isDir ( ) ) { unlink ( $ file_info -> getPathname ( ) ) ; } } } }
Flush all entries in the cache
Flush all entries in the cache