WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] WordPress Built-In Cache (5 posts)

  1. goxu
    Member
    Posted 7 years ago #

    Hi,

    Although I enabled the WordPress built-in cache, the number of mysql query stay the same. Isn't it supposed to decrease if it is enabled?

    I placed this in the wp-config.php

    define('ENABLE_CACHE', true);
    define('CACHE_EXPIRATION_TIME', 180);

    In the footer.php, I put the following code.

    global $wpdb;
    timer_stop(1);
    echo "seconds with" . $wpdb->num_queries . "database queries";

    Any information would be greatly appreciated.

  2. spencerp
    Member
    Posted 7 years ago #

    I haven't really dealt with the "built-in" cache for WordPress *yet*.. but, you could maybe go through the threads over here once, maybe? Or, maybe one of the threads from this search result will help.. Good luck!

    spencerp

  3. goxu
    Member
    Posted 7 years ago #

    Thanks, I apprecite your information.

  4. Samuel Wood (Otto)
    Tech Ninja
    Posted 7 years ago #

    Isn't it supposed to decrease if it is enabled?

    It *can*. That doesn't necessarily mean that it *will*.

    Also, looking at the 2.05 code, it seems like it only works when PHP's safe_mode is turned on. Which is contrary to what the comment right there in the code happens to say. I'm guessing that it is not bug-free at this point, and it's probably best to leave it off for now.

  5. goxu
    Member
    Posted 7 years ago #

    I see. Ok then I'll give it up and go with the WP-cache. Thanks Otto.

Topic Closed

This topic has been closed to new replies.

About this Topic