GordonLesti / Lesti_Fpc

Simple Magento Fullpagecache
https://gordonlesti.com/lesti-fpc-documentationversion-1-4-5/
Other
358 stars 159 forks source link

Invalidate cache after catalog rule apply #272

Closed ProxiBlue closed 7 years ago

ProxiBlue commented 7 years ago

If you look at the core catalogrule module you will find this in Mage_CatalogRule_Model_Rule:

/**
     * Invalidate related cache types
     *
     * @return Mage_CatalogRule_Model_Rule
     */
    protected function _invalidateCache()
    {
        $types = $this->_config->getNode(self::XML_NODE_RELATED_CACHE);
        if ($types) {
            $types = $types->asArray();
            $this->_app->getCacheInstance()->invalidateType(array_keys($types));
        }
        return $this;
    }

By adding the needed xml entry in Lesti Fpc module, the core code will mark FPC invalidated when catalog rules apply

GordonLesti commented 7 years ago

@ProxiBlue thank you very much for the PR

GordonLesti commented 7 years ago

I guess I will create tomorrow a new release.