Skip to:
Content

bbPress.org

Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#1859 closed defect (bug) (fixed)

Editing parent post causes child post cache invalidation

Reported by: johnjamesjacoby Owned by: johnjamesjacoby
Milestone: 2.1 Priority: normal
Severity: normal Version: 2.0
Component: API - Cache Keywords: has-patch
Cc:

Description

When editing a post, wp_insert_post() causes clean_post_cache() to run, which in-turn invalidates the caches for all child posts. Normally this is fine, until you have forums and topics with thousands of child items.

Attached patch is a first pass at working around cache invalidation by toggling the WordPress $_wp_suspend_cache_invalidation global before and after editing forums, topics, and replies.

Attachments (2)

1859.patch (1.9 KB) - added by johnjamesjacoby 9 years ago.
1859.2.patch (2.1 KB) - added by johnjamesjacoby 9 years ago.

Download all attachments as: .zip

Change History (7)

#1 @johnjamesjacoby
9 years ago

Once we can confirm this patch behaves as intended, calls to wp_suspend_cache_invalidation() should be hard-coded into bbPress core.

#2 @johnjamesjacoby
9 years ago

Attached patches don't handle editing via wp-admin. Working on a more universal solution.

#3 @johnjamesjacoby
9 years ago

  • Component changed from Code Improvement to Caching

#4 @johnjamesjacoby
9 years ago

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

(In [4011]) Cache:

  • When updating bbPress post content, prevent cache invalidation of its children.
  • Fixes #1859.
  • Hat tip wonderboymusic.

#5 @johnjamesjacoby
9 years ago

(In [4012]) Cache:

  • Update phpdoc for BBP_Skip_Children::pre_post_update()
  • See #1859.
Note: See TracTickets for help on using tickets.