WordPress.org

Make WordPress Core

Ticket #10381: 10381.3.diff

File 10381.3.diff, 447 bytes (added by Denis-de-Bernardy, 5 years ago)

an even fix from a memory usage standpoint -- avoids all potential loops and heavy memory usage

  • wp-includes/post.php

     
    36343634                        break; 
    36353635                $id = $_post->ancestors[] = $ancestor; 
    36363636        } 
     3637         
     3638        global $_wp_using_ext_object_cache; 
     3639        // force a refresh of the cache in case memcached is used 
     3640        if ( $_wp_using_ext_object_cache ) 
     3641                wp_cache_delete($_post->ID, 'posts'); 
    36373642} 
    36383643 
    36393644/**