/** * Adds the cache object to the context * * @param \Aimeos\MShop\Context\Item\Iface $context Context object including config * @return \Aimeos\MShop\Context\Item\Iface Modified context object */ protected function addCache(\Aimeos\MShop\Context\Item\Iface $context) { $cache = new \Aimeos\MAdmin\Cache\Proxy\Standard($context); $context->setCache($cache); return $context; }
/** * Adds the cache object to the context * * @param \Aimeos\MShop\Context\Item\Iface $context Context object including config * @return \Aimeos\MShop\Context\Item\Iface Modified context object */ protected function addCache(\Aimeos\MShop\Context\Item\Iface $context) { $config = $context->getConfig(); switch ($config->get('flow/cache/name', 'Flow')) { case 'None': $config->set('client/html/basket/cache/enable', false); return $context->setCache(\Aimeos\MW\Cache\Factory::createManager('None', array(), null)); case 'Flow': return $context->setCache(new \Aimeos\MAdmin\Cache\Proxy\Flow($context, $this->cache)); default: return $context->setCache(new \Aimeos\MAdmin\Cache\Proxy\Standard($context)); } }