Making WordPress.org


Ignore:
Timestamp:
03/31/2020 04:06:55 AM (5 years ago)
Author:
dd32
Message:

Plugin Directory: Clear memcache/db in-memory caches during XML Sitemap generation.

Fixes #5025.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/jobs/class-manager.php

    r9284 r9650  
    11<?php
    22namespace WordPressdotorg\Plugin_Directory\Jobs;
     3use WordPressdotorg\Plugin_Directory\Tools;
    34
    45/**
     
    314315     *
    315316     * @static
    316      * @global \wpdb            $wpdb
    317      * @global \WP_Object_Cache $wp_object_cache
     317     * @see Tools::clear_memory_heavy_variables();
    318318     */
    319319    public static function clear_memory_heavy_variables() {
    320         global $wpdb, $wp_object_cache;
    321 
    322         $wpdb->queries = [];
    323 
    324         if ( is_object( $wp_object_cache ) ) {
    325             $wp_object_cache->cache          = [];
    326             $wp_object_cache->group_ops      = [];
    327             $wp_object_cache->memcache_debug = [];
    328         }
     320        Tools::clear_memory_heavy_variables();
    329321    }
    330322
Note: See TracChangeset for help on using the changeset viewer.