src/Application.php
public function getCache(string $storage = 'default'): CacheInterface
    {
        if (!isset($this->cache[$storage])) {
            if ($storage === 'default') {
                if (!isset($this->implicit['cache'])) {
                    throw new \RuntimeException('The default cache storage was not set');
                }
                $this->cache[$storage] = $this->implicit['cache'];
            } else {
                $this->cache[$storage] = $this->getCollector()->getCacheDriver($storage);
            }
        }

        return $this->cache[$storage];
    }
public function getCache(string $storage = 'default'): CacheInterface
    {
        if (!isset($this->cache[$storage])) {
            if ($storage === 'default') {
                if (!isset($this->implicit['cache'])) {
                    throw new \RuntimeException('The default cache storage was not set');
                }
                $this->cache[$storage] = $this->implicit['cache'];
            } else {
                $this->cache[$storage] = $this->getCollector()->getCacheDriver($storage);
            }
        }

        return $this->cache[$storage];
    }
public function getCache ( string $ storage = 'default' ) : CacheInterface { if ( ! isset ( $ this -> cache [ $ storage ] ) ) { if ( $ storage === 'default' ) { if ( ! isset ( $ this -> implicit [ 'cache' ] ) ) { throw new \ RuntimeException ( 'The default cache storage was not set' ) ; } $ this -> cache [ $ storage ] = $ this -> implicit [ 'cache' ] ; } else { $ this -> cache [ $ storage ] = $ this -> getCollector ( ) -> getCacheDriver ( $ storage ) ; } } return $ this -> cache [ $ storage ] ; }
Returns a caching storage

@param   string $storage (optional) Storage name

@return  CacheInterface
Returns a caching storage