WordPress.org

Ready to get started?Download WordPress

Forums

WP Super Cache
Troubles with dynamic-cached-content (5 posts)

  1. johnh10
    Member
    Posted 3 years ago #

    I'm using PHP to serve cache files fine, but when I add the following dynamic-cached-content code the caching no longer works, although the page is still served. I thought I copied the format exactly but maybe I'm missing something.

    <!--dynamic-cached-content--><?php
    virtual ("/cgi-bin/atc/in.cgi");
    ?><!--
    virtual ("/cgi-bin/atc/in.cgi");
    --><!--/dynamic-cached-content-->

    Should that work?

  2. Donncha O Caoimh
    Member
    Plugin Author

    Posted 3 years ago #

    Yup, it should work. Tried the debug system in the plugin? It might tell you why caching isn't working.

  3. johnh10
    Member
    Posted 3 years ago #

    Hmm yes I do see the debug line
    21:57:23 / No closing html tag. Not caching.
    now I just have to figure out why. thanks.

  4. johnh10
    Member
    Posted 3 years ago #

    Okay I created a completely blank file atctest.php and WP Super Cache breaks using the code:

    <!--dynamic-cached-content--><?php
    virtual ("/full/path/to/atctest.php");
    ?><!--
    virtual ("/full/path/to/atctest.php");
    --><!--/dynamic-cached-content-->

    viewing the source code with debug lvl 5 I see

    <!--dynamic-cached-content-->
    <!-- Page not cached by WP Super Cache. No closing HTML tag. Check your theme. -->
    <!--
    
    virtual ("/full/path/to/atctest.php");
    
    --><!--/dynamic-cached-content-->

    However, WP Super Cache works fine if I change 'virtual' to 'include':

    <!--dynamic-cached-content--><?php
    include ("/full/path/to/atctest.php");
    ?><!--
    include ("/full/path/to/atctest.php");
    --><!--/dynamic-cached-content-->

    Is there some issue with the virtual call? I do need to use virtual for 3rd party support.

    I'm using PHP to serve cache files.

  5. Ron Rennick
    MultiSite Guru
    Posted 3 years ago #

    Have you verified that Apache/PHP are configured correctly to use the virtual function?

    http://php.net/manual/en/function.virtual.php

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic