• I see a lot of cache-specific code and I’m wondering if it’s enabled by default or not?

    What is the proper way to enable it, as of 2.9.1? I made various changes to wp-config and can’t find any authoritative explanation for how, why the cache works, if it still works at all, etc.

    Assuming the existing cache code is there for a reason, are there scenarios where the existing cache code actually hurts performance?

    Does adding lots of cache-specific code that I can’t turn off, opening/closing lots of cache files actually help performance? For example, why does get_comments() do this for every pageview, even if I don’t have the cache turned on:

    wp_cache_add( $cache_key, $comments, ‘comment’ );

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter PJ Brunet

    (@knowingart_com)

    I don’t understand this either:

    “Within a single page loading caching does still occur so as to reduce the number of database queries as much as possible.”

    This doesn’t make sense to me, why cache $something when it’s already available on that page as $something?

    Database queries of what exactly? Why would you load something “computationally intensive” more than once or twice on a page? What is so computationally intensive about a blog post with a few comments?

    Thread Starter PJ Brunet

    (@knowingart_com)

    OK, no way to turn off cache now?

    if ( file_exists(WP_CONTENT_DIR . ‘/object-cache.php’) ) {
    require_once (WP_CONTENT_DIR . ‘/object-cache.php’);
    $_wp_using_ext_object_cache = true;
    } else {
    require_once (ABSPATH . WPINC . ‘/cache.php’);
    $_wp_using_ext_object_cache = false;
    }

    Thread Starter PJ Brunet

    (@knowingart_com)

    OK, now I discover there is actually a separate wp-cache plugin, which may or may not have anything to do with object-cache.php or cache.php. Does anyone know?

    This makes me even more confused. I tried installing the wp-cache plugin last night–it works for a while and then all pages stop responding until I turn off the plugin. Even when the wp-cache plugin is working, you can’t even submit a comment until the cache expires?! Seriously?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Does WP cache code do more damage than good?’ is closed to new replies.