netz98/n98-magerun — pull request #418 by astorm (2014-10-21 07:57:10+00:00)
Title: Use already instantiated cache object.

Instantiating a new caching object means `n98-magerun` misses the options used in `_initCache`

#File: app/code/core/Mage/Core/Model/App.php
protected function _initCache(array $cacheInitOptions = array())
{
$this->_isCacheLocked = true;
$options = $this->_config->getNode('global/cache');
if ($options) {
$options = $options->asArray();
} else {
$options = array();
}
$options = array_merge($options, $cacheInitOptions);
$this->_cache = Mage::getModel('core/cache', $options);
$this->_isCacheLocked = false;
return $this;
}

If the user has default cache backend (i.e. redis) this may cause strange behavior, (see issue #417). Unless it causes issue elsewhere, `n98-magerun` should use the already instantiated cache object.