Changeset 7434 for trunk/bp-core/bp-core-cache.php
- Timestamp:
- 10/16/2013 05:41:34 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core/bp-core-cache.php
r7024 r7434 1 1 <?php 2 2 /** 3 * BuddyPress Core Caching Functions. 4 * 3 5 * Caching functions handle the clearing of cached objects and pages on specific 4 6 * actions throughout BuddyPress. … … 9 11 10 12 /** 11 * REQUIRES WP-SUPER-CACHE 13 * Prune the WP Super Cache. 14 * 15 * @see prune_super_cache() 12 16 * 13 17 * When wp-super-cache is installed this function will clear cached pages 14 18 * so that success/error messages are not cached, or time sensitive content. 15 *16 * @package BuddyPress Core17 19 */ 18 20 function bp_core_clear_cache() { … … 26 28 27 29 /** 28 * Add's 'bp' to global group of network wide cachable objects 29 * 30 * @package BuddyPress Core 30 * Add 'bp' to global group of network wide cachable objects. 31 31 */ 32 32 function bp_core_add_global_group() { … … 38 38 39 39 /** 40 * Clears all cached objects for a user, or a user is part of. 41 * 42 * @package BuddyPress Core 40 * Clear all cached objects for a user, or those that a user is part of. 43 41 */ 44 42 function bp_core_clear_user_object_cache( $user_id ) { … … 47 45 48 46 /** 49 * Clear s member count caches and transients47 * Clear member count caches and transients. 50 48 */ 51 49 function bp_core_clear_member_count_caches() { … … 62 60 * Update the metadata cache for the specified objects. 63 61 * 64 * @since BuddyPress (1.6) 65 * @global $wpdb WordPress database object for queries. 66 * @param array $args See $defaults definition for more details 67 * @return mixed Metadata cache for the specified objects, or false on failure. 62 * Based on WordPress's {@link update_meta_cache()}, this function primes the 63 * cache with metadata related to a set of objects. This is typically done when 64 * querying for a loop of objects; pre-fetching metadata for each queried 65 * object can lead to dramatic performance improvements when using metadata 66 * in the context of template loops. 67 * 68 * @since BuddyPress (1.6.0) 69 * 70 * @global $wpdb WordPress database object for queries.. 71 * 72 * @param array $args { 73 * Array of arguments. 74 * @type array|string $object_ids List of object IDs to fetch metadata for. 75 * Accepts an array or a comma-separated list of numeric IDs. 76 * @type string $object_type The type of object, eg 'groups' or 'activity'. 77 * @type string $meta_table The name of the metadata table being queried. 78 * @type string $object_column Optional. The name of the database column 79 * where IDs (those provided by $object_ids) are found. Eg, 'group_id' 80 * for the groups metadata tables. Default: $object_type . '_id'. 81 * @type string $cache_key_prefix Optional. The prefix to use when creating 82 * cache key names. Default: the value of $meta_table. 83 * } 84 * @return array|bool Metadata cache for the specified objects, or false on failure. 68 85 */ 69 86 function bp_update_meta_cache( $args = array() ) {
Note: See TracChangeset
for help on using the changeset viewer.