Make WordPress Core

Changeset 12693


Ignore:
Timestamp:
01/11/2010 06:53:52 PM (14 years ago)
Author:
ryan
Message:

Convert taxonomy children cache into a transient. fixes #11866

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/taxonomy.php

    r12658 r12693  
    19091909        wp_cache_delete('all_ids', $taxonomy);
    19101910        wp_cache_delete('get', $taxonomy);
    1911         delete_option("{$taxonomy}_children");
     1911        delete_transient("{$taxonomy}_children");
    19121912        do_action('clean_term_cache', $ids, $taxonomy);
    19131913    }
     
    20482048    if ( !is_taxonomy_hierarchical($taxonomy) )
    20492049        return array();
    2050     $children = get_option("{$taxonomy}_children");
     2050    $children = get_transient("{$taxonomy}_children");
    20512051    if ( is_array($children) )
    20522052        return $children;
     
    20582058            $children[$term->parent][] = $term->term_id;
    20592059    }
    2060     update_option("{$taxonomy}_children", $children);
     2060    set_transient("{$taxonomy}_children", $children);
    20612061
    20622062    return $children;
Note: See TracChangeset for help on using the changeset viewer.