Make WordPress Core

Opened 10 years ago

Closed 9 years ago

#28743 closed enhancement (fixed)

clean_term_cache does not obey wp_suspend_cache_invalidation

Reported by: rmccue's profile rmccue Owned by: johnbillion's profile johnbillion
Milestone: 4.3 Priority: normal
Severity: normal Version:
Component: Taxonomy Keywords:
Focuses: Cc:

Description

If you call wp_suspend_cache_invalidation( true ), then use wp_insert_term, clean_term_cache still clears the cache for the taxonomy.

This is in contrast to clean_post_cache and clean_attachment_cache

Attachments (1)

taxonomy.php.patch (746 bytes) - added by mwidmann 9 years ago.

Download all attachments as: .zip

Change History (8)

#1 @tollmanz
10 years ago

I added a patch for this in #21760. It's strongly tied to the work being done in that ticket, so I thought it belonged there.

#2 @goblindegook
10 years ago

Oh good, I came here to report just this bug!

I'm in the process of upserting around 50K posts and running into severe memory issues whenever I run wp_update_term() because the clean_object_term_cache() call in there still pointlessly loops through every single object with the term. You have to check wp_suspend_cache_invalidation() _before_ going into that foreach chain.

#3 @boonebgorges
10 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #21760.

This was added in [29915]. Going to close this one as a duplicate.

#4 @johnbillion
10 years ago

  • Owner set to johnbillion
  • Resolution changed from duplicate to fixed

In 30592:

Revert [30032] so appropriate PHP warnings aren't masked.

Fixes #28743

#5 @johnbillion
10 years ago

  • Resolution changed from fixed to duplicate

#6 @boonebgorges
9 years ago

  • Milestone set to 4.3
  • Resolution duplicate deleted
  • Status changed from closed to reopened
  • Type changed from defect (bug) to enhancement

[29915] was reverted, so I think we should reopen this ticket and consider it as a separate enhancement.

#7 @boonebgorges
9 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

In 32498:

Respect $_wp_suspend_cache_invalidation in clean_term_cache().

Props tollmanz, rmccue.
Fixes #28743.

Note: See TracTickets for help on using tickets.