From 437a0f5cbb53b9fb26c7c0197e0a839d84a75d8f Mon Sep 17 00:00:00 2001 From: markjaquith Date: Tue, 7 Sep 2010 04:13:01 +0000 Subject: [PATCH] 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 --- wp-includes/taxonomy.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/taxonomy.php b/wp-includes/taxonomy.php index 99f340998..c34269724 100644 --- a/wp-includes/taxonomy.php +++ b/wp-includes/taxonomy.php @@ -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;