Making WordPress.org


Ignore:
Timestamp:
06/16/2016 12:46:27 PM (10 years ago)
Author:
ocean90
Message:

Theme/Plugin Directory: Use a global cache group for locale associations.

Cache gets invalidated when a locale is added or deleted.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/functions.php

    r3386 r3388  
    114114 */
    115115function hreflang_link_attributes() {
     116        wp_cache_add_global_groups( array( 'locale-associations' ) );
    116117
    117118        if ( false === ( $sites = wp_cache_get( 'local-sites', 'locale-associations' ) ) ) {
     
    161162                } );
    162163
    163                 wp_cache_set( 'local-sites', $sites, 'locale-associations', DAY_IN_SECONDS );
     164                wp_cache_set( 'local-sites', $sites, 'locale-associations' );
    164165        }
    165166
Note: See TracChangeset for help on using the changeset viewer.