Skip to content

Commit

Permalink
Fix cache key
Browse files Browse the repository at this point in the history
  • Loading branch information
swissspidy committed Dec 11, 2024
1 parent 4713d3d commit 6c89dcf
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/wp-includes/user.php
Original file line number Diff line number Diff line change
Expand Up @@ -580,8 +580,7 @@ function count_user_posts_for_post_type( $user_id, $post_type = 'post', $public_
global $wpdb;

$where = get_posts_by_author_sql( $post_type, true, $user_id, $public_only );
$where_hash = wp_hash( $where );
$cache_key = "count_user_{$post_type}_{$user_id}_{$where_hash}";
$cache_key = "count_user_{$post_type}_{$user_id}";
$cache_group = $public_only ? 'user_posts_count_public' : 'user_posts_count';

// Try to get count from cache.
Expand Down

0 comments on commit 6c89dcf

Please sign in to comment.