WordPress.org

Make WordPress Core

Changeset 7763


Ignore:
Timestamp:
04/21/08 19:45:49 (7 years ago)
Author:
ryan
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.5/wp-includes/taxonomy.php

    r7545 r7763  
    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.