I am using TinyBrick's Lightspeed module for whole page caching and am trying to setup Hole Punching.
I'm following the directions at: http://blog.delorumcommerce.com/general/90-percent-lightspeed-traffic-fast-but-i-need-more
I have edited my template's header.phtml so that it contains the snippet:
<!-- TEST HOLE PUNCH -->
<!-- NOCACHE key="topMenuLinks" -->
<?php echo $this->getChildHtml('topCart') ?>
<!-- ENDNOCACHE -->
<!-- END TEST HOLE PUNCH -->
If I visit a page with nothing in my cart the shopping cart element is displayed, with the TEST HOLE PUNCH
comments, but with NOCACHE
removed.
If I view the page's cache file on the server I can see that it contains both the TEST HOLE PUNCH
and NOCACHE
comments, and if I view the page with ?debug_front=1
I see:
success!, I'm about to spit out a cached page, look out.
This seems to be functioning as expected, but if I add an item to the cart ?debug_front=1
replies:
disqualified with cart
valid disqualifiers without hole punch content... bummer
Viewing the page source still shows the TEST HOLE PUNCH
comment, but not the NOCACHE
comment. Surrounding a shopping cart element that accurately reports the number of items in carts
As I understand the blog post, I should be seeing a blank spot where the NOCACHE
comments were surrounded by the TEST HOLE PUNCH
comments.
After reading "valid disqualifiers without hole punch content... bummer"
I thought it might be failing because I didn't attempt to fill the hole.
I added a controller using the example code and am able to navigate to /lightspeedcontent/hole/index
and see:
{"topMenuLinks":"Hello World!"}
And I edited my catalog.xml
and cms.xml
so that all <action method="cachePage">
contain:
<holecontent>lightspeedcontent/hole/index</holecontent>
But I get the same results when visiting the pages with or without items in the cart.
Does anyone have experience with this module? Help would be greatly appreciated.