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

git-svn-id: https://develop.svn.wordpress.org/trunk@15583 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Mark Jaquith 2010-09-07 04:13:01 +00:00
parent bfb520f616
commit 400a42ffea
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;