2

The site I am working with uses an image gallery/banner rotater. The script for this is contained in the head.phtml file. It looks like all pages are reading it except those that are actually categories set up to display a static block only.

<script type="text/javascript">
        jQuery.noConflict();
        jQuery(document).ready(function() {
        jQuery(".navigat li:first").css("background","none");
            jQuery('.slideShow').slideShow({
                interval: 5
            });
             var body_h = jQuery('body').height();
             //alert(body_h);
             body_h = body_h-58;

             jQuery('.imagescont').height(body_h);
            });
    </script>

The admin is set to allow full page caching: Location: System/Configuration, using Default Config Left Menu: System Heading: External Full Page Cache Settings

When Cache Storage Management via System/Cache Management is turned off all pages read the gallery script and it functions as expected.

When Cache Storage Management via System/Cache Management is turned on then any page that is created via a category in admin set to use a static block fails. In this scenario, the source code shows that the gallery script is not present in the head.

Steps tried so far: Clear the cache completely after turning on Cache Storage Management via System/Cache Management. Remove gallery script from head.phtml and add to header.phtml again clearing the cache and waiting up to 10 minutes in case the cart needed time to cycle the changes through. Adding the script to the static block being tested. (No that does not make sense but I still wanted to rule it out.)

Does anyone have any ideas as to why this would be the case?

  • Unless you are using Zend Server - as far as I'm aware, the "External FPC" field is redundant on CE. – Ben Lessani - Sonassi May 17 '13 at 14:17
  • I believe it is because when only the full page cache is turned on, the developer tools I use show cached references to inputs such as the stylesheet. – Julie Carlson May 17 '13 at 14:20
  • As @sonassi says, this option doesn't in itself do anything on it's own. Cached references to things like stylesheets in your developer tools will be references to browser cache. – Peter O'Callaghan Dec 18 '13 at 22:05
2

You will need to disable block-level caching for the affected block by setting its cache_lifetime to 0 (explicit), or you will need to add the dynamic data to its cache key.

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.