From 32bfcc6aa89fd5c76eec6cfb3adeca78048e5031 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Mon, 11 Jan 2010 18:53:52 +0000 Subject: [PATCH] Convert taxonomy children cache into a transient. fixes #11866 git-svn-id: https://develop.svn.wordpress.org/trunk@12693 602fd350-edb4-49c9-b593-d223f7449a82 --- 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; }