当前位置: 首页>>代码示例>>PHP>>正文


PHP bp_update_meta_cache函数代码示例

本文整理汇总了PHP中bp_update_meta_cache函数的典型用法代码示例。如果您正苦于以下问题:PHP bp_update_meta_cache函数的具体用法?PHP bp_update_meta_cache怎么用?PHP bp_update_meta_cache使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了bp_update_meta_cache函数的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: test_bp_update_meta_cache_with_cache_misses

 /**
  * @group bp_update_meta_cache
  */
 public function test_bp_update_meta_cache_with_cache_misses()
 {
     // Use activity just because
     $a1 = $this->factory->activity->create();
     // Confirm that all activitymeta is deleted
     global $wpdb;
     $bp = buddypress();
     $wpdb->query($wpdb->prepare("DELETE FROM {$bp->activity->table_name_meta} WHERE activity_id = %d", $a1));
     bp_update_meta_cache(array('object_ids' => array($a1), 'object_type' => 'activity', 'cache_group' => 'activity_meta', 'meta_table' => buddypress()->activity->table_name_meta, 'object_column' => 'activity_id'));
     $this->assertSame(array(), wp_cache_get($a1, 'activity_meta'));
 }
开发者ID:JeroenNouws,项目名称:BuddyPress,代码行数:14,代码来源:cache.php

示例2: bp_activity_update_meta_cache

/**
 * Slurp up activitymeta for a specified set of activity items.
 *
 * It grabs all activitymeta associated with all of the activity items passed
 * in $activity_ids and adds it to the WP cache. This improves efficiency when
 * using querying activitymeta inline.
 *
 * @param int|str|array $activity_ids Accepts a single activity ID, or a comma-
 *        separated list or array of activity ids
 */
function bp_activity_update_meta_cache($activity_ids = false)
{
    global $bp;
    $cache_args = array('object_ids' => $activity_ids, 'object_type' => $bp->activity->id, 'object_column' => 'activity_id', 'cache_group' => 'activity_meta', 'meta_table' => $bp->activity->table_name_meta, 'cache_key_prefix' => 'bp_activity_meta');
    bp_update_meta_cache($cache_args);
}
开发者ID:sdh100shaun,项目名称:pantheon,代码行数:16,代码来源:bp-activity-cache.php

示例3: bp_groups_update_meta_cache

/**
 * Slurps up groupmeta
 *
 * This function is called in two places in the BP_Groups_Group class:
 *   - in the populate() method, when single group objects are populated
 *   - in the get() method, when multiple groups are queried
 *
 * It grabs all groupmeta associated with all of the groups passed in $group_ids and adds it to
 * the WP cache. This improves efficiency when using groupmeta inline
 *
 * @param int|str|array $group_ids Accepts a single group_id, or a comma-separated list or array of
 *    group ids
 */
function bp_groups_update_meta_cache($group_ids = false)
{
    global $bp;
    $cache_args = array('object_ids' => $group_ids, 'object_type' => $bp->groups->id, 'object_column' => 'group_id', 'meta_table' => $bp->groups->table_name_groupmeta, 'cache_key_prefix' => 'bp_groups_groupmeta');
    bp_update_meta_cache($cache_args);
}
开发者ID:pyropictures,项目名称:wordpress-plugins,代码行数:19,代码来源:bp-groups-cache.php

示例4: bp_messages_update_meta_cache

/**
 * Slurp up metadata for a set of messages.
 *
 * It grabs all message meta associated with all of the messages passed in
 * $message_ids and adds it to WP cache. This improves efficiency when using
 * message meta within a loop context.
 *
 * @since 2.2.0
 *
 * @param int|string|array|bool $message_ids Accepts a single message_id, or a
 *                                           comma-separated list or array of message ids.
 */
function bp_messages_update_meta_cache($message_ids = false)
{
    bp_update_meta_cache(array('object_ids' => $message_ids, 'object_type' => buddypress()->messages->id, 'cache_group' => 'message_meta', 'object_column' => 'message_id', 'meta_table' => buddypress()->messages->table_name_meta, 'cache_key_prefix' => 'bp_messages_meta'));
}
开发者ID:igniterealtime,项目名称:community-plugins,代码行数:16,代码来源:bp-messages-cache.php

示例5: bp_blogs_update_meta_cache

/**
 * Slurp up blogmeta for a specified set of blogs.
 *
 * It grabs all blogmeta associated with all of the blogs passed
 * in $blog_ids and adds it to the WP cache. This improves efficiency when
 * using querying blogmeta inline.
 *
 * @param int|string|array|bool $blog_ids Accepts a single blog ID, or a comma-
 *                                        separated list or array of blog IDs.
 */
function bp_blogs_update_meta_cache($blog_ids = false)
{
    $cache_args = array('object_ids' => $blog_ids, 'object_type' => buddypress()->blogs->id, 'object_column' => 'blog_id', 'cache_group' => 'blog_meta', 'meta_table' => buddypress()->blogs->table_name_blogmeta);
    bp_update_meta_cache($cache_args);
}
开发者ID:mawilliamson,项目名称:wordpress,代码行数:15,代码来源:bp-blogs-cache.php

示例6: bp_notifications_update_meta_cache

/**
 * Slurp up metadata for a set of notifications.
 *
 * It grabs all notification meta associated with all of the notifications
 * passed in $notification_ids and adds it to WP cache. This improves efficiency
 * when using notification meta within a loop context.
 *
 * @since 2.3.0
 *
 * @param int|string|array|bool $notification_ids Accepts a single notification_id, or a
 *                                                comma-separated list or array of
 *                                                notification ids.
 */
function bp_notifications_update_meta_cache($notification_ids = false)
{
    bp_update_meta_cache(array('object_ids' => $notification_ids, 'object_type' => buddypress()->notifications->id, 'cache_group' => 'notification_meta', 'object_column' => 'notification_id', 'meta_table' => buddypress()->notifications->table_name_meta, 'cache_key_prefix' => 'bp_notifications_meta'));
}
开发者ID:igniterealtime,项目名称:community-plugins,代码行数:17,代码来源:bp-notifications-cache.php


注:本文中的bp_update_meta_cache函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。