src/Files.php
/**
     * Flush all the cached entries.
     *
     * @param  boolean $all Wether to flush the whole database, or (preferably)
     *                      the entries prefixed with prefix_key and prefix_tag.
     * @return boolean Returns True on success or False on failure.
     */
Flush all the cached entries.
@param  boolean $all Wether to flush the whole database, or (preferably)
the entries prefixed with prefix_key and prefix_tag.
@return boolean Returns True on success or False on failure.
Flush all the cached entries . @param boolean $all Wether to flush the whole database or ( preferably ) the entries prefixed with prefix_key and prefix_tag . @return boolean Returns True on success or False on failure .
public function flush($all = false)
    {
        $files = scandir($this->getOption('directory'));
        foreach ($files as $file) {
            if ('.' === substr($file, 0, 1)) {
                continue;
            }
            $path = $this->getOption('directory') . DIRECTORY_SEPARATOR . $file;
            $fullKey = base64_decode($file);
            $key = $this->removePrefixKey($fullKey);
            if ($all || (!$all && ($key !== $fullKey || '' === $this->options['prefix_key']))) {
                unlink($path);
            }
        }
    }
public function flush ( $ all = false ) { $ files = scandir ( $ this -> getOption ( 'directory' ) ) ; foreach ( $ files as $ file ) { if ( '.' === substr ( $ file , 0 , 1 ) ) { continue ; } $ path = $ this -> getOption ( 'directory' ) . DIRECTORY_SEPARATOR . $ file ; $ fullKey = base64_decode ( $ file ) ; $ key = $ this -> removePrefixKey ( $ fullKey ) ; if ( $ all || ( ! $ all && ( $ key !== $ fullKey || '' === $ this -> options [ 'prefix_key' ] ) ) ) { unlink ( $ path ) ; } } }
Flush all the cached entries.
Flush all the cached entries .