0

I am the only administrator of the store. I am doing before night a Flush Cache Storage in order to get the following issue. In the morning I visit again the backend and there is a warning message "One or more of the Cache Types are invalidated: Blocks HTML output. Click here to go to Cache Management and refresh cache types."

Blocks HTML output warning reacts once you make changes in backend. Is anyone knowing why Blocks HTML output cache needs a refresh after a few hours without touching the backend?

1 Answer 1

-1

Your cron will run at specified intervals, such as every 5 minutes. Magento, will throw that message if any block has been modified. This can be from products, to CMS, or anything that is in a cached block. This is expected behavior you are experiencing. You can look here for some reasons: Mage::app()->getCacheInstance()->getInvalidatedTypes(); That is found in this class

Mage_Core_Model_Cache

/**
 * Get array of all invalidated cache types
 *
 * @return array
 */
public function getInvalidatedTypes()
{
    $invalidatedTypes = array();
    $types = $this->_getInvalidatedTypes();
    if ($types) {
        $allTypes = $this->getTypes();
        foreach ($types as $type => $flag) {
            if (isset($allTypes[$type]) && $this->canUse($type)) {
                $invalidatedTypes[$type] = $allTypes[$type];
            }
        }
    }
    return $invalidatedTypes;
}

There are many reason why a block may be invalidated, I guess I would not worry too much about it. However, if your customer will eventually not just take our word that things are working fine, you can create an observer that fixes the invalid blocks when an admin user logs in the site. That seems a bit much but I have had non technical customers before and sometimes its easier just to find a fix rather than try to explain the depths of Magento to a store owner.

1
  • To add to this answer in terms of product data a new product relation such as related or cross-sell can invalidate cache. Also a product stock status or enabled status change. Basically it's very easy to do. Jul 7, 2019 at 7:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.