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];
}