New answers tagged

0

You can add cache control header inside your controller /** * This action render random number for each request */ public function execute() { $page = $this->pageFactory->create(); //We are using HTTP headers to control various page caches (varnish, fastly, built-in php cache) $page->setHeader('Cache-...


0

Try adding this method to your block class public function getCacheKey() { $storeId = $this->_storeManager->getStore()->getId(); $catId = $this->getCurrentCategory()->getId(); return "CATEGORY_SUBMENU_{$catId}_STORE_{$storeId}"; } That will ensure every category gets an unique cached block instance. The point is that no 2 ...


0

require_once("app/Mage.php"); Mage::app('admin'); Mage::register('isSecureArea', 1); Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID); $type = 'block_html'; Enterprise_PageCache_Model_Cache::getCacheInstance()->cleanType($type); ?> try to execute above script in browser


0

After many hours of debugging I managed to resolve this. It turns out to be an issue with the SalesFire extension that was installed. Disabling this extension prevented the errors from occurring and allowed the site to switch caching methods.


0

Have you tried removing the generated directory? rm -rf generated


Top 50 recent answers are included