【发布时间】:2017-09-11 12:25:23
【问题描述】:
启用 FPC 缓存时,会话值在块中不起作用。如何处理启用缓存的块中的会话值。我添加了客户会话 ID,如下所示。如何从块中的缓存中获取客户 ID。
public function getCacheKeyInfo() {
$info = parent::getCacheKeyInfo();
$info['current_product_id'] = Mage::registry('current_product')->getId();
$info['customer_id'] = Mage::getSingleton('customer/session')->getCustomerId();
return $info;
}
【问题讨论】:
-
什么版本的 Magento 以及您使用的 PFC 模块是什么?
-
magento 1.4 并在自定义模块中实现了 FPC
-
嗯,也许它在自定义模块中?但我们需要更多。
-
它是默认的magento块缓存。从这里实现。inchoo.net/magento/magento-block-caching
-
@Ronn0 - 请检查更新后的问题
标签: magento magento-1.4