protected function getCacheDriver($cacheNamespace, CacheProvider $cacheDriver = null)
    {
        if (!$cacheDriver instanceof CacheProvider) {
            $cacheDriver = clone $this->getMetadataCacheDriver();
            $cacheDriver->setNamespace($cacheNamespace);
        }

        if ($cacheDriver->getNamespace() === '') {
            $cacheDriver->setNamespace($cacheNamespace);
        }

        return $cacheDriver;
    }
protected function getCacheDriver($cacheNamespace, CacheProvider $cacheDriver = null)
    {
        if (!$cacheDriver instanceof CacheProvider) {
            $cacheDriver = clone $this->getMetadataCacheDriver();
            $cacheDriver->setNamespace($cacheNamespace);
        }

        if ($cacheDriver->getNamespace() === '') {
            $cacheDriver->setNamespace($cacheNamespace);
        }

        return $cacheDriver;
    }
protected function getCacheDriver ( $ cacheNamespace , CacheProvider $ cacheDriver = null ) { if ( ! $ cacheDriver instanceof CacheProvider ) { $ cacheDriver = clone $ this -> getMetadataCacheDriver ( ) ; $ cacheDriver -> setNamespace ( $ cacheNamespace ) ; } if ( $ cacheDriver -> getNamespace ( ) === '' ) { $ cacheDriver -> setNamespace ( $ cacheNamespace ) ; } return $ cacheDriver ; }
Get cache driver.

@param string             $cacheNamespace
@param CacheProvider|null $cacheDriver

@return CacheProvider
Get cache driver .