src/Charcoal/Cache/CacheBuilder.php
public function build($cacheDriver, $poolOptions = null)
    {
        if (!($cacheDriver instanceof DriverInterface)) {
            $cacheDriver = $this->resolveDriver($cacheDriver);
        }

        $poolOptions  = $this->parsePoolOptions($poolOptions);
        $poolInstance = new $poolOptions['pool_class']($cacheDriver);

        $this->applyPoolOptions($poolInstance, $poolOptions);

        return $poolInstance;
    }
public function build($cacheDriver, $poolOptions = null)
    {
        if (!($cacheDriver instanceof DriverInterface)) {
            $cacheDriver = $this->resolveDriver($cacheDriver);
        }

        $poolOptions  = $this->parsePoolOptions($poolOptions);
        $poolInstance = new $poolOptions['pool_class']($cacheDriver);

        $this->applyPoolOptions($poolInstance, $poolOptions);

        return $poolInstance;
    }
public function build ( $ cacheDriver , $ poolOptions = null ) { if ( ! ( $ cacheDriver instanceof DriverInterface ) ) { $ cacheDriver = $ this -> resolveDriver ( $ cacheDriver ) ; } $ poolOptions = $ this -> parsePoolOptions ( $ poolOptions ) ; $ poolInstance = new $ poolOptions [ 'pool_class' ] ( $ cacheDriver ) ; $ this -> applyPoolOptions ( $ poolInstance , $ poolOptions ) ; return $ poolInstance ; }
Create a new cache pool.

@param  mixed $cacheDriver The name of a registered cache driver,
the class name or instance of a {@see DriverInterface cache driver}.
An array may be used to designate fallback drivers.
@param  mixed $poolOptions Optional settings for the new pool.
If a string is specified, it is used as the namespace for the new pool.
If an array is specified, it is assumed to be associative and is merged with the default settings.
Otherwise, the default settings are used.
@return PoolInterface
Create a new cache pool .