61

I had this problem with EE 1.14.2 and it looks like the same issue has come up in CE 1.9.2. I documented my problem and solution on this SE question. Basically due to the following code being added to the constructor of Mage_Cms_Block_Block: $this->setCacheTags(array(Mage_Cms_Model_Block::CACHE_TAG)); $this->setCacheLifetime(false); CMS static ...


13

I just upgraded to 1.9.2.0 and I'm experiencing this too. Categories that are set to display Static Blocks + Products are randomly displaying the wrong Static Block. This did not exist prior to my 1.9.2.0 upgrade. Temporary Fix Disable the Blocks HTML output cache and the blocks displayed are correctly.


13

Here we go with local module based solution as above solution does not provide whole steps. We need to create Custom module because you all know that Magento Boogieman will get you! if change the core :) You will need to following files: app/etc/modules/Bhupendra_Cms.xml <?xml version="1.0"?> <config> <modules> <...


12

Flush and refresh: Refreshing means that it cleans up alle the invalidated cache keys. for example: when you save a widget while the cache is active you get a message that the cache is invalid. In this instance you don't need to flush the cache, just refresh it. Flushing means that it throws all the cache away, it will rebuild everything from scratch. CSS/...


12

The "Flush Magento Cache" button will only flush out cache records based on their tags. This uses the Zend_Cache::CLEANING_MODE_MATCHING_ANY_TAG mode when calling clean on the cache backend. The "Flush Cache Storage" button will flush the entire cache backing (where the backend supports it), using the Zend_Cache::CLEANING_MODE_ALL mode when calling clean on ...


11

This is how I solved it eventually, add the following methods to the block in question: const FORM_KEY_PLACEHOLDER = '{{FORM_KEY}}'; protected function _toHtml() { return $this->_insertFormKeyPlaceholder(parent::_toHtml()); } protected function _afterToHtml($html) { return $this->_restoreFormKey(parent::_afterToHtml($html)); } protected ...


9

I've created a module that will let you do more bulk operations from the admin. Clicking "Flush DB" will actually execute the flushdb command. Download: https://github.com/steverobbins/Magento-Redismanager Otherwise you have to use command line to flush them "completely"


8

It would be better to override the getCacheKeyInfo() method instead of getCacheKey(). public function getCacheKeyInfo() { $info = parent::getCacheKeyInfo(); // Add any additional data you want $info[] = Mage::app()->getRequest()->getOriginalRequest()->getRequestUri(); return $info; } The hashing of the value is taken care of ...


8

I have updated my response. In my previous answer, I had a block cacheable=false. This is incorrect because it do the page is not cacheable. For knowing if the customer is logged or not, you must do the next: Namespace/Modulename/etc/di.xml <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:...


7

There is no official patch for this, however, it was resolved in CE 1.9.2.1 diff -r magento-CE-1.9.2.0/app/code/core/Mage/Cms/Block/Block.php magento-CE-1.9.2.1/app/code/core/Mage/Cms/Block/Block.php 74a75,94 > > /** > * Retrieve values of properties that unambiguously identify unique content > * > * @return array > ...


6

Sanjana, you can do this two ways: Disable with getChildHtml() According to Magento's getChildHtml() you can tell it to use the cache or not to by sending the second parameter: public function getChildHtml($name = '', $useCache = true, $sorted = false) Set $useCache for this block when calling $this->getChildHtml('footer'): $this->getChildHtml('...


6

First it is important to understand that this is not an error, it is merely a notification. There can be myriad of reasons a block cache is invalidate from updates to products, catalog price rule changes, and 3rd party extensions. Also running of cronjobs can cause block caches to become invalidated as well. There are some community extensions available (...


5

If you are using the full page cache of Magento Enterprise, you need to do two things: disable block caching for the block exclude the block from otherwise cached pages with full page cache hole punching 1. Disable block caching Change the block declaration to: <block type="page/html_topmenu" name="ajaxCart" as="ajaxCart" template="page/html/ajaxCart....


5

cacheable=false on a block makes whole page not cacheable. This is how it is designed, so no problem here. As for your goal - you want to render user-specific content as part of cached page. Such content should not be rendered on server. It should be retrieved from server using customer data JS api (see mini shopping cart), and rendered using JS. ...


4

I can confirm this issue too. To reproduce: Using the CMS -> Widgets, create a widget to add a static block to the left sidebar. Then create second widget to add second static block (different block than in step 1) to the left sidebar. If cache is disabled, both static blocks are correctly displayed in the sidebar. But if you enable cache, you will ...


4

Honestly, I didn't face such "tricky" situations before.. So cannot give you 100% guarantee on below code. I can see two solutions for this. 1. Forcefully Make bottom.wrapper Never Cached This is the easiest solution that came into my mind. ie we need to tell Magento that, I don't want to cache this particular block. For this you can try.. <default> ...


4

Arguments in <action> can be defined as nested elements and will be converted to array: <block type="cms/block" name="block_id"> <action method="setTags"> <tags> <tag1>cms_block_twocmspages</tag1> <tag2>( just in case you want to add more tags )</tag2> </tags> ...


4

Below I have explain how to cache your result in simple way. <?php class Pcarousel_Pcarousel_Helper_Data extends Mage_Core_Helper_Abstract { const CACHE_KEY = 'Pcarousel_AllCategories_'; const CACHE_LIFE_TIME = 86400; const CACHE_GROUP = 'Pcarousel_AllCategories_list'; public function getAllCategoriesArray($optionList = false) { ...


4

I finally solved it by writing a plugin for the Magento\Framework\App\PageCache\Identifier class app/code/Vendor/Module/etc/frontend/di.xml <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd"> <type name="Magento\Framework\...


4

Finally got a solution for the above question. I have used two methods getCacheLifetime() and getCacheKeyInfo() of the core Magento 2 template block file and overridden those two methods of the class: Magento\Framework\View\Element\AbstractBlock. The code looks like below: //below code to set the life time of the cache protected function getCacheLifetime()...


3

By default, Magento CMS Block will not be cached. So it would be nice if we cache CMS static blocks. This is what this extension does (one of my free extension). Feel free to use it. Basically this extension listens to the event core_block_abstract_to_html_before and enable cacheing for CMS Blocks. This is what observer does public function ...


3

One scenario I can think of where you might want to cache the collection is if other content within the block is likely to change or you're working with multiple collection models. For instance: Say you need to list the catalog's categories but mark ones where the customer has purchased something within those categories. The list of categories will be ...


3

Start by identifying the block class instance by var_dump(get_class_name($this)) Within the phtml file. Then in the block (either by extending it if core, or editing it if local/community), define the cache lifetime. There's three main (magic getter/setter) important functions used when Magento evaluates if a block is cacheable. getCacheLifetime() ...


3

public function fetchView($fileName) fetches each .phtml file for your home page and includes it. Can you use NewRelic? Or if not, turn on the Varien Profiler or use your own timers and logging to measure the time taken for each $filename's fetchview. ($filename will be the block template file eg left.phtml) That should indicate which block template file ...


3

Piotr from Magento has published a non-official patch for this issue for the time being: https://gist.github.com/piotrekkaminski/ecd245e8c9390e4020db Seems to do the trick. Yes, it's editing the core, but fixes the issue until Magento releases the official patch or next version...


3

Upgrade Magento to 1.9.2.1 I did it and enabled cache for Blocks HTML output and it seems to be fixed. As well as some security issues are addressed in new release.


3

In latest version of Magento enhances it with new security features . you can add permissions in system->permissions to static block.


3

You may be applied the patches to your store Magento1.9.1.0, I guess. Anyway there is a troublesome issue with Magento 1.9.2.0 release and I guess that is what making problem here too.. Problem is recent stable version (ie 1.9.2) included cacheing for static blocks, but it is not enough to uniquely cache each individual static blocks. This is an extension ...


3

Go to Lesti FPC configuration in System > Configuration > System > Lesti FPC and try moving the top.links block from "Lazy Blocks" to "Bypass Handles".


3

Let's start at the Magento\Framework\View\Layout::getOutput. As you may suspect, this transforms the layout to output. In this method there is a call to renderElement from the same class. This one renders each element of the page. In this method, the event core_layout_render_element is dispatched. And this event is observed by the PageCache module. <...


Only top voted, non community-wiki answers of a minimum length are eligible