【问题标题】:Magento events not firing on full page cacheMagento 事件未在整页缓存上触发
【发布时间】:2018-05-09 21:43:02
【问题描述】:

我正在为 Magento 1.x 使用 Amasty 全页缓存

在检查页面缓存命中时触发的事件时,我发现 resource_get_tablename 和 http_response_send_before 是缓存命中期间触发的仅有的 2 个事件。

但是,当缓存被命中时,将观察者附加到 http_response_send_before 不会做任何事情。

我查看了 Mage_Core_Model_App 的 dispatchEvent 函数,发现缓存命中时 $this->_events 是空的,那么有没有办法将观察者附加到任何类型的事件上?我正在添加一些跟踪,不想修改 index.php

【问题讨论】:

    标签: php magento magento-1.9


    【解决方案1】:

    controller_front_send_response_before

    无论是否启用 FPC,都会触发此事件。尝试对这个使用观察者

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-12-29
      • 1970-01-01
      • 2012-10-25
      • 1970-01-01
      • 2016-11-01
      • 1970-01-01
      • 1970-01-01
      • 2016-03-12
      相关资源
      最近更新 更多