[ Index ] |
PHP Cross Reference of BuddyPress |
[Source view] [Print] [Project Stats]
BuddyPress Core Caching Functions. Caching functions handle the clearing of cached objects and pages on specific actions throughout BuddyPress.
File Size: | 431 lines (13 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
bp_core_clear_cache() X-Ref |
Prune the WP Super Cache. When WP Super Cache is installed, this function will clear cached pages so that success/error messages or time-sensitive content are not cached. return: int since: 1.0.0 |
bp_core_clear_user_object_cache( $user_id ) X-Ref |
Clear all cached objects for a user, or those that a user is part of. param: string $user_id User ID to delete cache for. since: 1.0.0 |
bp_core_clear_member_count_caches() X-Ref |
Clear member count caches and transients. since: 1.6.0 |
bp_core_clear_directory_pages_cache_page_edit( $post_id = 0 ) X-Ref |
Clear the directory_pages cache when one of the pages is updated. param: int $post_id ID of the page that was saved. since: 2.0.0 |
bp_core_clear_directory_pages_cache_settings_edit( $option ) X-Ref |
Clear the directory_pages cache when the bp-pages option is updated. param: string $option Option name. since: 2.0.0 |
bp_core_clear_root_options_cache( $option ) X-Ref |
Clear the root_blog_options cache when any of its options are updated. param: string $option Option name. since: 2.0.0 |
bp_get_non_cached_ids( $item_ids, $cache_group ) X-Ref |
Determine which items from a list do not have cached values. return: array param: array $item_ids ID list. param: string $cache_group The cache group to check against. since: 2.0.0 |
bp_update_meta_cache( $args = array() X-Ref |
Update the metadata cache for the specified objects. Based on WordPress's {@link update_meta_cache()}, this function primes the cache with metadata related to a set of objects. This is typically done when querying for a loop of objects; pre-fetching metadata for each queried object can lead to dramatic performance improvements when using metadata in the context of template loops. return: false|array Metadata cache for the specified objects, or false on failure. param: array $args { since: 1.6.0 |
bp_core_get_incremented_cache( $key, $group ) X-Ref |
Gets a value that has been cached using an incremented key. A utility function for use by query methods like BP_Activity_Activity::get(). return: array|bool False if no cached values are found, otherwise an array of IDs. param: string $key Unique key for the query. Usually a SQL string. param: string $group Cache group. Eg 'bp_activity'. since: 2.7.0 |
bp_core_set_incremented_cache( $key, $group, $ids ) X-Ref |
Caches a value using an incremented key. An "incremented key" is a cache key that is hashed with a unique incrementor, allowing for bulk invalidation. Use this method when caching data that should be invalidated whenever any object of a given type is created, updated, or deleted. This usually means data related to object queries, which can only reliably cached until the underlying set of objects has been modified. See, eg, BP_Activity_Activity::get(). return: bool param: string $key Unique key for the query. Usually a SQL string. param: string $group Cache group. Eg 'bp_activity'. param: array $ids Array of IDs. since: 2.7.0 |
bp_core_delete_incremented_cache( $key, $group ) X-Ref |
Delete a value that has been cached using an incremented key. A utility function for use by query methods like BP_Activity_Activity::get(). return: bool True on successful removal, false on failure. param: string $key Unique key for the query. Usually a SQL string. param: string $group Cache group. Eg 'bp_activity'. since: 3.0.0 |
bp_core_get_incremented_cache_key( $key, $group ) X-Ref |
Gets the key to be used when caching a value using an incremented cache key. The $key is hashed with a component-specific incrementor, which is used to invalidate multiple caches at once. return: string param: string $key Unique key for the query. Usually a SQL string. param: string $group Cache group. Eg 'bp_activity'. since: 2.7.0 |
bp_core_get_incrementor( $group ) X-Ref |
Gets a group-specific cache incrementor. The incrementor is paired with query identifiers (like SQL strings) to create cache keys that can be invalidated en masse. If an incrementor does not yet exist for the given `$group`, one will be created. return: string param: string $group Cache group. Eg 'bp_activity'. since: 2.7.0 |
bp_core_reset_incrementor( $group ) X-Ref |
Reset a group-specific cache incrementor. Call this function when all incrementor-based caches associated with a given cache group should be invalidated. return: bool True on success, false on failure. param: string $group Cache group. Eg 'bp_activity'. since: 2.7.0 |
bp_invitations_reset_cache_incrementor() X-Ref |
Resets all incremented bp_invitations caches. since: 5.0.0 |
bp_set_object_type_terms_cache_group() X-Ref |
Add a cache group for Database object types. since: 7.0.0 |
bp_clear_object_type_terms_cache( $type_id = 0, $taxonomy = '' ) X-Ref |
Clear the Database object types cache. param: int $type_id The Type's term ID. param: string $taxonomy The Type's taxonomy name. since: 7.0.0 |
bp_optouts_reset_cache_incrementor() X-Ref |
Resets all incremented bp_optout caches. since: 8.0.0 |
Generated: Thu Nov 21 01:00:57 2024 | Cross-referenced by PHPXref 0.7.1 |