WordPress.org

Ready to get started?Download WordPress

Forums

WP Super Cache
mfunc still causing pageload to halt even with super_cache_late_init = 1 on (2 posts)

  1. BotenAnna
    Member
    Posted 3 years ago #

    Hello all,

    I have a wordpress site that I'm running on a VPS with limited resources so I need to have some caching enabled, but everyone's favorite feature of the blog I'm setting up is that the tagline is generated from a random quote in the database. This needs to stay, even with some performance hits!

    So, this code replaces where my tagline goes; randomquote() is the sole public function of a loaded plugin:

    <!--mfunc randomquote() -->
    <?php randomquote() ?>
    <!--/mfunc-->

    Function just echoes something along the lines of:

    "a quote goes here" --A person, 1987

    If I enable supercache the page stops loading at the point it hits the quote (so you just see the blog title) so I found out you were supposed to have in wp-cache-config.php:

    $wp_super_cache_late_init = 1;

    I didn't have wp-cache-config.php so I copied the example and set that option to 1. Still, when enabling even half-on mode, it stops when it hits that function.

    What's going wrong? Am I missing something? :(

  2. Donncha O Caoimh
    Member
    Plugin Author

    Posted 3 years ago #

    You're doing something wrong. wp-cache-config.php is in wp-content/ and if the plugin was configured your site should have it. You probably set the late init variable in a config file in the wrong place.

    Check your PHP error log too.

  3. Donncha O Caoimh
    Member
    Plugin Author

    Posted 3 years ago #

    You're doing something wrong. wp-cache-config.php is in wp-content/ and if the plugin was configured your site should have it. You probably set the late init variable in a config file in the wrong place.

    Check your PHP error log too.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic