Make WordPress Core

Ticket #11431: 11431.diff

File 11431.diff, 721 bytes (added by Denis-de-Bernardy, 16 years ago)
  • wp-includes/taxonomy.php

     
    788788        }
    789789
    790790        if ( empty($terms) ) {
    791                 wp_cache_add( $cache_key, array(), 'terms' );
     791                wp_cache_add( $cache_key, array(), 'terms', 86400 ); # one day
    792792                $terms = apply_filters('get_terms', array(), $taxonomies, $args);
    793793                return $terms;
    794794        }
     
    835835                $terms = array_slice($terms, $offset, $number);
    836836        }
    837837
    838         wp_cache_add( $cache_key, $terms, 'terms' );
     838        wp_cache_add( $cache_key, $terms, 'terms', 86400 ); # one day
    839839
    840840        $terms = apply_filters('get_terms', $terms, $taxonomies, $args);
    841841        return $terms;