src/core/framework/core/3rdparty/ezcomponents/Cache/src/storage/memory.php
public function purge( $limit = null )
    {
        $this->fetchSearchRegistry( true );

        $purgedIds = array();
        $ttl       = $this->properties['options']->ttl;

        foreach ( $this->searchRegistry[$this->properties['location']] as $id => $identifiers )
        {
            $deleted = false;
            foreach( $identifiers as $identifier => $data )
            {
                if ( $ttl !== false && $this->calcLifetime( $identifier ) == 0 )
                {
                    // Since ID <-> identifier mapping is ambigious, this does
                    // not ensure that all data for an ID is deleted. However,
                    // this should work if used properly
                    $this->backend->delete( $identifier );
                    $this->unRegisterIdentifier( null, null, $identifiers, true );
                    // Avoid adding an ID twice to the returned array
                    $deleted = true;
                }
            }
            if ( $deleted === true )
            {
                $purgedIds[] = $id;
            }
            if ( $limit !== null && count( $purgedIds ) >= $limit )
            {
                break;
            }
        }
        $this->storeSearchRegistry();
        return $purgedIds;
    }
public function purge( $limit = null )
    {
        $this->fetchSearchRegistry( true );

        $purgedIds = array();
        $ttl       = $this->properties['options']->ttl;

        foreach ( $this->searchRegistry[$this->properties['location']] as $id => $identifiers )
        {
            $deleted = false;
            foreach( $identifiers as $identifier => $data )
            {
                if ( $ttl !== false && $this->calcLifetime( $identifier ) == 0 )
                {
                    // Since ID <-> identifier mapping is ambigious, this does
                    // not ensure that all data for an ID is deleted. However,
                    // this should work if used properly
                    $this->backend->delete( $identifier );
                    $this->unRegisterIdentifier( null, null, $identifiers, true );
                    // Avoid adding an ID twice to the returned array
                    $deleted = true;
                }
            }
            if ( $deleted === true )
            {
                $purgedIds[] = $id;
            }
            if ( $limit !== null && count( $purgedIds ) >= $limit )
            {
                break;
            }
        }
        $this->storeSearchRegistry();
        return $purgedIds;
    }
public function purge ( $ limit = null ) { $ this -> fetchSearchRegistry ( true ) ; $ purgedIds = array ( ) ; $ ttl = $ this -> properties [ 'options' ] -> ttl ; foreach ( $ this -> searchRegistry [ $ this -> properties [ 'location' ] ] as $ id => $ identifiers ) { $ deleted = false ; foreach ( $ identifiers as $ identifier => $ data ) { if ( $ ttl !== false && $ this -> calcLifetime ( $ identifier ) == 0 ) { // Since ID <-> identifier mapping is ambigious, this does // not ensure that all data for an ID is deleted. However, // this should work if used properly $ this -> backend -> delete ( $ identifier ) ; $ this -> unRegisterIdentifier ( null , null , $ identifiers , true ) ; // Avoid adding an ID twice to the returned array $ deleted = true ; } } if ( $ deleted === true ) { $ purgedIds [ ] = $ id ; } if ( $ limit !== null && count ( $ purgedIds ) >= $ limit ) { break ; } } $ this -> storeSearchRegistry ( ) ; return $ purgedIds ; }
Purge outdated data from the storage.

This method purges outdated data from the cache. If $limit is given, a
maximum of $limit items is purged. Otherwise all outdated items are
purged. The method returns an array containing the IDs of all cache
items that have been purged.

@param int $limit
@return array(string)
Purge outdated data from the storage .