Do not cache terms indefinitely... use TTL of one day. fixes #11431. props Denis-de-Bernardy

git-svn-id: http://svn.automattic.com/wordpress/trunk@15583 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
markjaquith 2010-09-07 04:13:01 +00:00
parent f2c9a08521
commit 437a0f5cbb
1 changed files with 2 additions and 2 deletions

View File

@ -1020,7 +1020,7 @@ function &get_terms($taxonomies, $args = '') {
}
if ( empty($terms) ) {
wp_cache_add( $cache_key, array(), 'terms' );
wp_cache_add( $cache_key, array(), 'terms', 86400 ); // one day
$terms = apply_filters('get_terms', array(), $taxonomies, $args);
return $terms;
}
@ -1071,7 +1071,7 @@ function &get_terms($taxonomies, $args = '') {
$terms = array_slice($terms, $offset, $number);
}
wp_cache_add( $cache_key, $terms, 'terms' );
wp_cache_add( $cache_key, $terms, 'terms', 86400 ); // one day
$terms = apply_filters('get_terms', $terms, $taxonomies, $args);
return $terms;