1

I'm trying to add some parts of a homepage to the cache to try and improve the load time of a site. I'm pulling in phtml files into the home page using my local.xml.

<cms_index_index>
    <reference name="content">
        <block type="core/template" name="home.carousel" as="carousel" template="page/home-carousel.phtml">
            <action method="setCacheLifetime"><lifetime>3600</lifetime></action>
        </block>
    </reference>
<cms_index_index>

I thought i was able to add any block to the cache by just setting <action method="setCacheLifetime"> but so far my testing has found that this block is not being added to the cache. To test i have been searching through the cache files to find any element in the phtml in the cache. I have also been doing speed tests, but those are not proving conclusive.

This is a enterprise site running full page cache, which might be caching the page, but i have found little information about how to test that.

So my question is two fold, how do i add a block to the cache and how do i test that the block is getting cached.

0

I have done some more digging to try and track down this problem. After a bunch more digging, i came across this extension from Fabrizio (so you know it has to be good) that gives more details about the block on the page.

From the popups that it delivers, it seems that my code does in fact add the blocks to the cache using the xml.

enter image description here

When i change the lifetime values in the XML, they update on the front end as well. So that's pretty convincing that i'm in the right spot. One thing that i haven't been able to track down is the actual cache files in the cache folder. I think i need a better understanding of those files as it is, but so far, i think i have what i need.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.