I want to add a cache to my custom phtml
page.
I built a module that show a custom PHP page. But that code will not cache default by Magento cache. I need to add it, but I don't now how and I can not find the answer on the internet.
The page will show right, but very very slow, so thats why I need to cache it.
My module looks like this:
app/design/frontend/gaveaktie/default/template/magazijnplanning/view.phtml
(this is the PHP code) app/design/frontend/gaveaktie/default/layout/test.xml
app/etc/modules/Test_Test.xml
app/code/local/Test/Test/controllers/IndexController.php
app/code/local/Test/Test/etc/config.xml
You have to create the block class for your template ( Test_Test_Block_View
) and make sure that you set correct caching variables. You can find more info here .
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.