Example #1
0
 /**
  * Clean Cached Data
  *
  * @param string|optional $mode
  *   Cleaning Mode
  *
  * @return boolean
  *   TRUE on success and FALSE otherwise
  *
  * @throws Next\Cache\Backend\BackendException
  *   Trying to clean old or user caches, which is not supported
  *   by File Backend
  */
 public function clean($mode = self::CLEAN_USER)
 {
     clearstatcache();
     switch ($mode) {
         case parent::CLEAN_OLD:
             throw BackendException::cleanOldCache();
             break;
         case parent::CLEAN_USER:
             throw BackendException::cleanUserCache();
             break;
         case parent::CLEAN_ALL:
         default:
             return Tools::delete($this->options->outputDirectory);
             break;
     }
 }