From 30181fd9eaa7733926473145357b412c86a2a223 Mon Sep 17 00:00:00 2001 From: ryan Date: Mon, 11 Jan 2010 18:53:52 +0000 Subject: [PATCH] Convert taxonomy children cache into a transient. fixes #11866 git-svn-id: http://svn.automattic.com/wordpress/trunk@12693 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/taxonomy.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wp-includes/taxonomy.php b/wp-includes/taxonomy.php index 979972d546..6e3c485e53 100644 --- a/wp-includes/taxonomy.php +++ b/wp-includes/taxonomy.php @@ -1908,7 +1908,7 @@ function clean_term_cache($ids, $taxonomy = '') { $cleaned[$taxonomy] = true; wp_cache_delete('all_ids', $taxonomy); wp_cache_delete('get', $taxonomy); - delete_option("{$taxonomy}_children"); + delete_transient("{$taxonomy}_children"); do_action('clean_term_cache', $ids, $taxonomy); } @@ -2047,7 +2047,7 @@ function update_term_cache($terms, $taxonomy = '') { function _get_term_hierarchy($taxonomy) { if ( !is_taxonomy_hierarchical($taxonomy) ) return array(); - $children = get_option("{$taxonomy}_children"); + $children = get_transient("{$taxonomy}_children"); if ( is_array($children) ) return $children; @@ -2057,7 +2057,7 @@ function _get_term_hierarchy($taxonomy) { if ( $term->parent > 0 ) $children[$term->parent][] = $term->term_id; } - update_option("{$taxonomy}_children", $children); + set_transient("{$taxonomy}_children", $children); return $children; }