Title: Does WP cache code do more damage than good?
Last modified: August 19, 2016

---

# Does WP cache code do more damage than good?

 *  [PJ Brunet](https://wordpress.org/support/users/knowingart_com/)
 * (@knowingart_com)
 * [16 years, 5 months ago](https://wordpress.org/support/topic/does-wp-cache-code-do-more-damage-than-good/)
 * 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](https://wordpress.org/support/users/knowingart_com/)
 * (@knowingart_com)
 * [16 years, 5 months ago](https://wordpress.org/support/topic/does-wp-cache-code-do-more-damage-than-good/#post-1342370)
 * 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](https://wordpress.org/support/users/knowingart_com/)
 * (@knowingart_com)
 * [16 years, 5 months ago](https://wordpress.org/support/topic/does-wp-cache-code-do-more-damage-than-good/#post-1342388)
 * 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](https://wordpress.org/support/users/knowingart_com/)
 * (@knowingart_com)
 * [16 years, 5 months ago](https://wordpress.org/support/topic/does-wp-cache-code-do-more-damage-than-good/#post-1342554)
 * 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.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 1 participant
 * Last reply from: [PJ Brunet](https://wordpress.org/support/users/knowingart_com/)
 * Last activity: [16 years, 5 months ago](https://wordpress.org/support/topic/does-wp-cache-code-do-more-damage-than-good/#post-1342554)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
