Commit 9e0a3c4f by halweg

fix

parent 5d304167
......@@ -113,7 +113,6 @@ class MediaFeed extends Template {
public function cacheFeed($feed)
{
var_dump($this->_cacheState->isEnabled(Type::TYPE_IDENTIFIER));
if ($this->_cacheState->isEnabled(Type::TYPE_IDENTIFIER)) {
$this->save($feed, $this->id);
}
......
<?php
namespace Joshine\InstagramFeed\Model\Cache;
use Magento\Framework\App\Cache\Type\FrontendPool;
use Magento\Framework\Cache\Frontend\Decorator\TagScope;
class Type extends TagScope
{
const TYPE_IDENTIFIER = 'instagram_feed';
const CACHE_TAG = 'INSTAGRAM_FEED';
const CACHE_LIFETIME = 60 * 60;
/**
* @param FrontendPool $cacheFrontendPool
*/
public function __construct(FrontendPool $cacheFrontendPool)
{
parent::__construct($cacheFrontendPool->get(self::TYPE_IDENTIFIER), self::CACHE_TAG);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment