Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?

wp-cron.php:

   41
   42   $value = 0;
   43:  if ( wp_using_ext_object_cache() ) {
   44     /*
   45      * Skip local cache and force re-fetch of doing_cron transient

wp-includes/load.php:

  ...
  429       require_once ( WP_CONTENT_DIR . '/object-cache.php' );
  430       if ( function_exists( 'wp_cache_init' ) )
  431:        wp_using_ext_object_cache( true );
  432     }
  433
  434     $first_init = true;
  435:  } elseif ( ! wp_using_ext_object_cache() && file_exists( WP_CONTENT_DIR . '/object-cache.php' ) ) {
  436     /*
  437      * Sometimes advanced-cache.php can load object-cache.php before
  ...
  440      * incorrectly. Double check if an external cache exists.
  441      */
  442:    wp_using_ext_object_cache( true );
  443   }
  444
  445:  if ( ! wp_using_ext_object_cache() )
  446     require_once ( ABSPATH . WPINC . '/cache.php' );
  447

wp-includes/ms-load.php:

  149    */
  150   $using_paths = true;
  151:  if ( wp_using_ext_object_cache() ) {
  152     $using_paths = wp_cache_get( 'networks_have_paths', 'site-options' );
  153     if ( false === $using_paths ) {

wp-includes/nav-menu.php:

  562
  563   // Get all posts and terms at once to prime the caches
  564:  if ( empty( $fetched[$menu->term_id] ) || wp_using_ext_object_cache() ) {
  565     $fetched[$menu->term_id] = true;
  566     $posts = array();

wp-includes/option.php:

  190   global $wpdb;
  191
  192:  if ( !is_multisite() || wp_using_ext_object_cache() || defined( 'WP_INSTALLING' ) )
  193     return;
  194
  ...
  544   do_action( 'delete_transient_' . $transient, $transient );
  545
  546:  if ( wp_using_ext_object_cache() ) {
  547     $result = wp_cache_delete( $transient, 'transient' );
  548   } else {
  ...
  600     return $pre;
  601
  602:  if ( wp_using_ext_object_cache() ) {
  603     $value = wp_cache_get( $transient, 'transient' );
  604   } else {
  ...
  665   $value = apply_filters( 'pre_set_transient_' . $transient, $value, $expiration );
  666
  667:  if ( wp_using_ext_object_cache() ) {
  668     $result = wp_cache_set( $transient, $value, 'transient', $expiration );
  669   } else {
  ...
 1298   do_action( 'delete_site_transient_' . $transient, $transient );
 1299
 1300:  if ( wp_using_ext_object_cache() ) {
 1301     $result = wp_cache_delete( $transient, 'site-transient' );
 1302   } else {
 ....
 1356     return $pre;
 1357
 1358:  if ( wp_using_ext_object_cache() ) {
 1359     $value = wp_cache_get( $transient, 'site-transient' );
 1360   } else {
 ....
 1419   $expiration = (int) $expiration;
 1420
 1421:  if ( wp_using_ext_object_cache() ) {
 1422     $result = wp_cache_set( $transient, $value, 'site-transient', $expiration );
 1423   } else {

wp-includes/query.php:

 2439
 2440     if ( !isset($q['cache_results']) ) {
 2441:      if ( wp_using_ext_object_cache() )
 2442         $q['cache_results'] = false;
 2443       else
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.