[wp-trac] [WordPress Trac] #14485: Taxonomy hierarchy cache isn't properly refreshed

WordPress Trac noreply at wordpress.org
Sun Dec 16 07:33:11 UTC 2012


#14485: Taxonomy hierarchy cache isn't properly refreshed
-------------------------------------------------+-------------------------
 Reporter:  thealien                             |       Owner:
     Type:  defect (bug)                         |      Status:  new
 Priority:  high                                 |   Milestone:  Future
Component:  Cache                                |  Release
 Severity:  normal                               |     Version:  3.0
 Keywords:  needs-testing needs-unit-tests       |  Resolution:
  needs-patch                                    |
-------------------------------------------------+-------------------------
Changes (by cpkwebsolutions):

 * cc: cpkwebsolutions (added)
 * keywords:  has-patch needs-testing needs-unit-tests => needs-testing
     needs-unit-tests needs-patch
 * severity:  major => normal


Comment:

 Temporary solution:

 function force_flush_term_cache( $taxonomy = 'category ) {
         if ( !taxonomy_exists( $taxonomy ) ) return FALSE;

         wp_cache_set( 'last_changed', time( ) - 1800, 'terms' );[[BR]]
         wp_cache_delete( 'all_ids', $taxonomy );[[BR]]
         wp_cache_delete( 'get', $taxonomy );[[BR]]
         delete_option( "{$taxonomy}_children" );[[BR]]
         _get_term_hierarchy( $taxonomy );[[BR]]
         return TRUE;[[BR]]
 }

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/14485#comment:60>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list