Make WordPress Core


Ignore:
Timestamp:
09/06/2013 06:09:24 PM (12 years ago)
Author:
wonderboymusic
Message:

Introduce wp_using_ext_object_cache() - mimic wp_suspend_cache_invalidation() and discourage direct access to $_wp_using_ext_object_cache, cleaning up importing of globals in functions and provides function to modify that global. Loads the packaged object cache when an external cache hasn't been loaded or doesn't contain wp_cache_init().

Fixes #21401.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/query.php

    r25287 r25289  
    19471947     */
    19481948    function get_posts() {
    1949         global $wpdb, $user_ID, $_wp_using_ext_object_cache;
     1949        global $wpdb, $user_ID;
    19501950
    19511951        $this->parse_query();
     
    19971997
    19981998        if ( !isset($q['cache_results']) ) {
    1999             if ( $_wp_using_ext_object_cache )
     1999            if ( wp_using_ext_object_cache() )
    20002000                $q['cache_results'] = false;
    20012001            else
Note: See TracChangeset for help on using the changeset viewer.