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

前端 未结 4 2039
北海茫月
北海茫月 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 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.

提交回复
热议问题