public function clear($check)
    {
        if ($check) {
            return true;
        }
        if (class_exists('APCuIterator', false)) {
            $iterator = new APCuIterator(
                '/^' . preg_quote($this->_config['prefix'], '/') . '/',
                APC_ITER_NONE
            );
            apcu_delete($iterator);

            return true;
        }

        $cache = apcu_cache_info(); // Raises warning by itself already
        foreach ($cache['cache_list'] as $key) {
            if (strpos($key['info'], $this->_config['prefix']) === 0) {
                apcu_delete($key['info']);
            }
        }

        return true;
    }
public function clear($check)
    {
        if ($check) {
            return true;
        }
        if (class_exists('APCuIterator', false)) {
            $iterator = new APCuIterator(
                '/^' . preg_quote($this->_config['prefix'], '/') . '/',
                APC_ITER_NONE
            );
            apcu_delete($iterator);

            return true;
        }

        $cache = apcu_cache_info(); // Raises warning by itself already
        foreach ($cache['cache_list'] as $key) {
            if (strpos($key['info'], $this->_config['prefix']) === 0) {
                apcu_delete($key['info']);
            }
        }

        return true;
    }
public function clear ( $ check ) { if ( $ check ) { return true ; } if ( class_exists ( 'APCuIterator' , false ) ) { $ iterator = new APCuIterator ( '/^' . preg_quote ( $ this -> _config [ 'prefix' ] , '/' ) . '/' , APC_ITER_NONE ) ; apcu_delete ( $ iterator ) ; return true ; } $ cache = apcu_cache_info ( ) ; // Raises warning by itself already foreach ( $ cache [ 'cache_list' ] as $ key ) { if ( strpos ( $ key [ 'info' ] , $ this -> _config [ 'prefix' ] ) === 0 ) { apcu_delete ( $ key [ 'info' ] ) ; } } return true ; }
Delete all keys from the cache. This will clear every cache config using APC.

@param bool $check If true, nothing will be cleared, as entries are removed
from APC as they expired. This flag is really only used by FileEngine.
@return bool True Returns true.
@link https://secure.php.net/manual/en/function.apcu-cache-info.php
@link https://secure.php.net/manual/en/function.apcu-delete.php
Delete all keys from the cache . This will clear every cache config using APC .