Title: Does WP_Cache work in 2.7.1?
Last modified: August 19, 2016

---

# Does WP_Cache work in 2.7.1?

 *  [jeffb0](https://wordpress.org/support/users/jeffb0/)
 * (@jeffb0)
 * [17 years ago](https://wordpress.org/support/topic/does-wp_cache-work-in-271/)
 * Has wp_cache been disabled for plugin/theme authors?
 * I can’t seem to get wp_cache_get() to retrieve my data, even though a print_r()
   shows it’s been added by wp_cache_add(), however only for one page-load.
 * ‘WP_CACHE’, true has been added to my config in the proper place.
 * Here is my code:
 *     ```
       global $wpdb;
       $data = wp_cache_get( 'foo_all_terms', 'all_terms' );
        if ( !data ) {
        echo 'FALSE!! GETTING TERMS and ADDING to CACHE!!';
        $query = "SELECT name FROM $wpdb->terms";
        $data = $wpdb->get_col( $query ); // array
        wp_cache_add( 'foo_all_terms', $data, 'all_terms' );
       }
       ```
   
 * Thanks, this is really driving me nuts.

Viewing 1 replies (of 1 total)

 *  [mooshmoosh](https://wordpress.org/support/users/mooshmoosh/)
 * (@mooshmoosh)
 * [16 years, 5 months ago](https://wordpress.org/support/topic/does-wp_cache-work-in-271/#post-1093682)
 * Hi,
    I’m having the exact same problem with WP 2.7.1. using the KpicasaGallery
   Plugin. It doesn’t seem to get anything from the cache.
 * I’d appreciate any suggestion.
    Thanks!

Viewing 1 replies (of 1 total)

The topic ‘Does WP_Cache work in 2.7.1?’ is closed to new replies.

 * 1 reply
 * 2 participants
 * Last reply from: [mooshmoosh](https://wordpress.org/support/users/mooshmoosh/)
 * Last activity: [16 years, 5 months ago](https://wordpress.org/support/topic/does-wp_cache-work-in-271/#post-1093682)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
