Skip invalidation of child post content when editing a parent.
This prevents invalidating caches for topics and replies when editing a forum or a topic. Without this in place, WordPress will attempt to invalidate all child posts whenever a parent post is modified. This can cause thousands of cache invalidations to occur on a single edit, which is no good for anyone.
| since | 2.1.0 bbPress (r4011) |
|---|---|
| package | bbPress |
| subpackage | Cache |
__construct()
| since | 2.1.0 bbPress (r4011) |
|---|
pre_post_update(integer $post_id = 0) : \If
Check that the post being updated is a bbPress post type, saves the post ID to be used later, and adds an action to 'clean_post_cache' that prevents child post caches from being cleared.
| since | 2.1.0 bbPress (r4011) |
|---|
integerThe post ID being updated
\Ifinvalid post datarestore_cache_invalidation()
| since | 2.1.0 bbPress (r4011) |
|---|
$original_cache_invalidation : boolean
false$updating_post : integer
0