So, on one of our recent launches, we had a lot of events that we observed, such as controller_action_predispatch. As soon as the site went live, we began to notice that our observers were never attracted to them. After a little investigation, one of our developers found this block of code in Mage_Core_Model_App around line 292
if ($this->_cache->processRequest()) { $this->getResponse()->sendResponse(); } else { $this->_initModules(); $this->loadAreaPart(Mage_Core_Model_App_Area::AREA_GLOBAL, Mage_Core_Model_App_Area::PART_EVENTS); if ($this->_config->isLocalConfigLoaded()) { $this->_initCurrentStore($scopeCode, $scopeType); $this->_initRequest(); Mage_Core_Model_Resource_Setup::applyAllDataUpdates(); } $this->getFrontController()->dispatch(); }
As you can see, is $ this → _ cache-> processRequest () really true that it is when the full page cache is turned on that you never get sent. The developer really found a http_response_send_before which causes a call anyway, but it seems to me that this is a mistake, or you should never use these dispatch manager events for anything if full page caching is enabled. Any thoughts?
magento
dan.codes
source share