public function build($name = null)
    {
        $caching = new Caching();
        $caching->setStack(new DebugStack());

        if ($this->debug && isset($this->debugDriver)) {
            $caching->setDriver($this->resolveDriver($this->debugDriver));

            return $caching;
        }

        if (null === $name) {
            $name = $this->configuration->get('caching.default', 'null');
        }

        $driver = $this->resolveDriver($name);
        $caching->setDriver($driver);

        return $caching;
    }
public function build($name = null)
    {
        $caching = new Caching();
        $caching->setStack(new DebugStack());

        if ($this->debug && isset($this->debugDriver)) {
            $caching->setDriver($this->resolveDriver($this->debugDriver));

            return $caching;
        }

        if (null === $name) {
            $name = $this->configuration->get('caching.default', 'null');
        }

        $driver = $this->resolveDriver($name);
        $caching->setDriver($driver);

        return $caching;
    }
public function build ( $ name = null ) { $ caching = new Caching ( ) ; $ caching -> setStack ( new DebugStack ( ) ) ; if ( $ this -> debug && isset ( $ this -> debugDriver ) ) { $ caching -> setDriver ( $ this -> resolveDriver ( $ this -> debugDriver ) ) ; return $ caching ; } if ( null === $ name ) { $ name = $ this -> configuration -> get ( 'caching.default' , 'null' ) ; } $ driver = $ this -> resolveDriver ( $ name ) ; $ caching -> setDriver ( $ driver ) ; return $ caching ; }
Build cache driver.

@param  string $name

@return DriverInterface
Build cache driver .