Make WordPress Core

Changeset 7738


Ignore:
Timestamp:
04/18/2008 05:42:13 PM (17 years ago)
Author:
ryan
Message:

Only use the args defined in defaults to compute the cache key in get_terms. Props mdawaffe.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/taxonomy.php

    r7645 r7738  
    581581    }
    582582
    583     $key = md5( serialize( $args ) . serialize( $taxonomies ) );
     583    // $args can be whatever, only use the args defined in defaults to compute the key
     584    $key = md5( serialize( compact(array_keys($defaults)) ) . serialize( $taxonomies ) );
     585
    584586    if ( $cache = wp_cache_get( 'get_terms', 'terms' ) ) {
    585587        if ( isset( $cache[ $key ] ) )
Note: See TracChangeset for help on using the changeset viewer.