[ Index ]

PHP Cross Reference of BBPress




/src/includes/core/ -> cache.php (summary)

bbPress Cache Helpers Helper functions used to communicate with WordPress's various caches. Many of these functions are used to work around specific WordPress nuances. They are subject to changes, tweaking, and will need iteration as performance improvements are made to WordPress core.

File Size: 168 lines (5 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

BBP_Skip_Children:: (5 methods):

Class: BBP_Skip_Children  - X-Ref

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.

__construct()   X-Ref
Hook into the 'pre_post_update' action.

since: 2.1.0 bbPress (r4011)

pre_post_update( $post_id = 0 )   X-Ref
Only clean post caches for main bbPress posts.

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)
return: If invalid post data
param: int $post_id The post ID being updated

skip_related_posts( $post_id = 0 )   X-Ref
Skip cache invalidation of related posts if the post ID being invalidated
is not the one that was just updated.

since: 2.1.0 bbPress (r4011)
return: If invalid post data
param: int $post_id The post ID of the cache being invalidated

restore_cache_invalidation()   X-Ref
Restore the cache invalidation to its previous value.

since: 2.1.0 bbPress (r4011)

bbp_clean_post_cache( $post_id = null, $post = null )   X-Ref
Will clean a post in the cache.

Will call to clean the term object cache associated with the post ID.

since: 2.1.0 bbPress (r4040)
since: 2.6.0 bbPress (r6053) Introduced the `$post_id` parameter.
param: int     $post_id The post id.
param: WP_Post $post    The WP_Post object.

Generated: Mon Jul 22 01:00:47 2024 Cross-referenced by PHPXref 0.7.1