public function flushExpired()
    {
        $this->Logger->debug('Flush all expired called.');

        try {
            foreach ( new DirectoryIterator($this->dir) as $item ) {
                $filename = $item->getPath() .DIRECTORY_SEPARATOR.$item->getFilename();
                $pathinfo = pathinfo($filename);

                // Find all files ending with .cfcache and destroy them if expired!
                if ($pathinfo['extension'] == $this->fileExtension)
                    $data = $this->readFile($filename);
                    if ($this->isExpired(null, $data))
                        unlink($filename);
            }
        } catch (Exception $e) {
            $this->Logger->error("flushExpired error: " . $e->getMessage());
            return false;
        }

        return true;
    }
public function flushExpired()
    {
        $this->Logger->debug('Flush all expired called.');

        try {
            foreach ( new DirectoryIterator($this->dir) as $item ) {
                $filename = $item->getPath() .DIRECTORY_SEPARATOR.$item->getFilename();
                $pathinfo = pathinfo($filename);

                // Find all files ending with .cfcache and destroy them if expired!
                if ($pathinfo['extension'] == $this->fileExtension)
                    $data = $this->readFile($filename);
                    if ($this->isExpired(null, $data))
                        unlink($filename);
            }
        } catch (Exception $e) {
            $this->Logger->error("flushExpired error: " . $e->getMessage());
            return false;
        }

        return true;
    }
public function flushExpired ( ) { $ this -> Logger -> debug ( 'Flush all expired called.' ) ; try { foreach ( new DirectoryIterator ( $ this -> dir ) as $ item ) { $ filename = $ item -> getPath ( ) . DIRECTORY_SEPARATOR . $ item -> getFilename ( ) ; $ pathinfo = pathinfo ( $ filename ) ; // Find all files ending with .cfcache and destroy them if expired! if ( $ pathinfo [ 'extension' ] == $ this -> fileExtension ) $ data = $ this -> readFile ( $ filename ) ; if ( $ this -> isExpired ( null , $ data ) ) unlink ( $ filename ) ; } } catch ( Exception $ e ) { $ this -> Logger -> error ( "flushExpired error: " . $ e -> getMessage ( ) ) ; return false ; } return true ; }
Removes all expired items from the cache store

@return boolean true on success, false on failure
Removes all expired items from the cache store