Bisna\Doctrine\Container::getCacheInstance PHP Method

getCacheInstance() public method

If Cache Instance name could not be found, NameNotFoundException is thrown.
public getCacheInstance ( string $cacheName = null ) : Doctrine\Common\Cache\Cache
$cacheName string Optional Cache Instance name
return Doctrine\Common\Cache\Cache Cache Instance
    public function getCacheInstance($cacheName = null)
    {
        $cacheName = $cacheName ?: $this->defaultCacheInstance;
        // Check if Cache Instance has not yet been initialized
        if (!isset($this->cacheInstances[$cacheName])) {
            // Check if Cache Instance is configured
            if (!isset($this->configuration['cache'][$cacheName])) {
                throw new Exception\NameNotFoundException("Unable to find Doctrine Cache Instance '{$cacheName}'.");
            }
            $this->cacheInstances[$cacheName] = $this->startCacheInstance($this->configuration['cache'][$cacheName]);
            unset($this->configuration['cache'][$cacheName]);
        }
        return $this->cacheInstances[$cacheName];
    }