Enterprise Edition Controller events not firing if Full Page Cache is enabled

前端 未结 4 1997
北海茫月
北海茫月 2021-01-12 05:00

So on one of our recent launches we had a lot of events that we were observer such as controller_action_predispatch. Once the site went live we started noticing that our obs

相关标签:
4条回答
  • 2021-01-12 05:42

    controller_front_send_response_before

    This event will be fired irrespective of FPC enabled

    0 讨论(0)
  • 2021-01-12 05:46

    The only reliable event to listen for with and without Full Page Cache enabled is http_response_send_before.

    0 讨论(0)
  • 2021-01-12 06:02

    See here if you want to learn how Caching works with Magento Enterprise

    http://magentophp.blogspot.com/2011/02/magento-enterprise-full-page-caching.html

    0 讨论(0)
  • 2021-01-12 06:06

    Given the nature of the full page caching, I'd call this "works as intended". While it can be a little strange not to have some events firing, they had to pick a line and this one makes sense to me, especially since the controller is never really dispatched.

    You should use those controller dispatch events for anything that affects the page (as it still needs to be generated), but if you are using it for tracking and such, no it would not be appropriate.

    0 讨论(0)
提交回复
热议问题