Php Magento缓存自定义phtml页面

Php Magento缓存自定义phtml页面,php,magento-1.7,Php,Magento 1.7,我想向我的自定义phtml页面添加缓存 我构建了一个显示定制PHP页面的模块。但该代码不会缓存默认的Magento缓存。我需要添加它,但我现在不知道如何,我无法在互联网上找到答案 页面将显示正确,但速度非常慢,因此我需要缓存它 我的模块如下所示: app/design/frontend/gaveaktie/default/template/magazijnplanning/view.phtml(这是PHP代码) app/design/frontend/gaveaktie/default/lay

我想向我的自定义
phtml
页面添加缓存

我构建了一个显示定制PHP页面的模块。但该代码不会缓存默认的Magento缓存。我需要添加它,但我现在不知道如何,我无法在互联网上找到答案

页面将显示正确,但速度非常慢,因此我需要缓存它

我的模块如下所示:

  • app/design/frontend/gaveaktie/default/template/magazijnplanning/view.phtml
    (这是PHP代码)
  • app/design/frontend/gaveaktie/default/layout/test.xml
  • app/etc/modules/Test\u Test.xml
  • app/code/local/Test/Test/controllers/IndexController.php
  • app/code/local/Test/Test/etc/config.xml

您必须为模板创建块类(
Test\u Test\u block\u View
),并确保设置了正确的缓存变量。你可以找到更多信息