src/core/framework/core/3rdparty/ezcomponents/Cache/src/storage/file.php
public function delete( $id = null, $attributes = array(), $search = false )
    {
        $filename = $this->properties['location']
                  . $this->generateIdentifier( $id, $attributes );

        $filesToDelete = array();
        if ( file_exists( $filename ) )
        {
            $filesToDelete[] = $filename;
        }
        else if ( $search === true )
        {
            $filesToDelete = $this->search( $id, $attributes );
        }

        $deletedIds = array();
        foreach ( $filesToDelete as $filename )
        {
            if ( unlink( $filename ) === false )
            {
                throw new ezcBaseFilePermissionException(
                    $filename,
                    ezcBaseFileException::WRITE,
                    'Could not unlink cache file.'
                );
            }
            $deleted      = $this->extractIdentifier( $filename );
            $deletedIds[] = $deleted['id'];
        }
        return $deletedIds;
    }
public function delete( $id = null, $attributes = array(), $search = false )
    {
        $filename = $this->properties['location']
                  . $this->generateIdentifier( $id, $attributes );

        $filesToDelete = array();
        if ( file_exists( $filename ) )
        {
            $filesToDelete[] = $filename;
        }
        else if ( $search === true )
        {
            $filesToDelete = $this->search( $id, $attributes );
        }

        $deletedIds = array();
        foreach ( $filesToDelete as $filename )
        {
            if ( unlink( $filename ) === false )
            {
                throw new ezcBaseFilePermissionException(
                    $filename,
                    ezcBaseFileException::WRITE,
                    'Could not unlink cache file.'
                );
            }
            $deleted      = $this->extractIdentifier( $filename );
            $deletedIds[] = $deleted['id'];
        }
        return $deletedIds;
    }
public function delete ( $ id = null , $ attributes = array ( ) , $ search = false ) { $ filename = $ this -> properties [ 'location' ] . $ this -> generateIdentifier ( $ id , $ attributes ) ; $ filesToDelete = array ( ) ; if ( file_exists ( $ filename ) ) { $ filesToDelete [ ] = $ filename ; } else if ( $ search === true ) { $ filesToDelete = $ this -> search ( $ id , $ attributes ) ; } $ deletedIds = array ( ) ; foreach ( $ filesToDelete as $ filename ) { if ( unlink ( $ filename ) === false ) { throw new ezcBaseFilePermissionException ( $ filename , ezcBaseFileException :: WRITE , 'Could not unlink cache file.' ) ; } $ deleted = $ this -> extractIdentifier ( $ filename ) ; $ deletedIds [ ] = $ deleted [ 'id' ] ; } return $ deletedIds ; }
Delete data from the cache.
Purges the cached data for a given ID and or attributes. Using an ID
purges only the cache data for just this ID.

Additional attributes provided will matched additionally. This can give
you an immense speed improvement against just searching for ID ( see
{@link ezcCacheStorage::restore()} ).

If you only provide attributes for deletion of cache data, all cache
data matching these attributes will be purged.

@param string $id                         The item ID to purge.
@param array(string=>string) $attributes  Attributes describing the
data to restore.
@param bool $search                       Whether to search for items
if not found directly.
@return void

@throws ezcBaseFilePermissionException
If an already existsing cache file could not be unlinked.
This exception means most likely that your cache directory
has been corrupted by external influences (file permission
change).
Delete data from the cache . Purges the cached data for a given ID and or attributes . Using an ID purges only the cache data for just this ID .