Making WordPress.org


Ignore:
Timestamp:
06/15/2017 01:03:19 PM (7 years ago)
Author:
Otto42
Message:

Plugin Directory: Fix cache timeout and naming for hreflang memcache. Set to 1 day timeout. Fixes #2870

File:
1 edited

Legend:

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

    r5570 r5571  
    642642        wp_cache_add_global_groups( array( 'locale-associations' ) );
    643643
    644         if ( false === ( $sites = wp_cache_get( 'local-sites', 'locale-associations' ) ) ) {
     644        if ( false === ( $sites = wp_cache_get( 'local-sites-'.get_post()->post_name, 'locale-associations' ) ) ) {
    645645
    646646            // get subdomain/locale associations
     
    689689            } );
    690690
    691 
    692             wp_cache_set( 'local-sites', $sites, 'locale-associations' );
     691            wp_cache_set( 'local-sites-'.get_post()->post_name, $sites, 'locale-associations', DAY_IN_SECONDS );
    693692        }
    694693
Note: See TracChangeset for help on using the changeset viewer.