Legacy workaround to skip invalidation of child posts when editing a parent.
Older WordPress versions invalidated child post caches when updating a parent, which could clear thousands of topic and reply caches during a single edit. Supported WordPress versions no longer need this workaround.
| since | 2.1.0 bbPress (r4011) |
|---|---|
| deprecated | 2.7.0 WordPress no longer invalidates child post caches on update. Retained for compatibility; bbPress no longer instantiates it. |
| package | bbPress |
| subpackage | Cache |
__construct()
| since | 2.1.0 bbPress (r4011) |
|---|
pre_post_update(integer $post_id = 0)
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.
restore_cache_invalidation()
| since | 2.1.0 bbPress (r4011) |
|---|
$original_cache_invalidation : boolean
false$updating_post : integer
0