[MM-44263] Cache Posts Usage (#20254)
* Fetch users only posts * Cache Posts Usage * Explicitly validate posts count before testing usage * Add DocString * Revert cache changes * Revert "Revert cache changes" This reverts commit ba693f8d5028b62c19f6a730e8dca73a224d0761.
Этот коммит содержится в:
@@ -31,6 +31,7 @@ const (
|
||||
ClusterEventInvalidateCacheForChannelMemberCounts ClusterEvent = "inv_channel_member_counts"
|
||||
ClusterEventInvalidateCacheForLastPosts ClusterEvent = "inv_last_posts"
|
||||
ClusterEventInvalidateCacheForLastPostTime ClusterEvent = "inv_last_post_time"
|
||||
ClusterEventInvalidateCacheForPostsUsage ClusterEvent = "inv_posts_usage"
|
||||
ClusterEventInvalidateCacheForTeams ClusterEvent = "inv_teams"
|
||||
ClusterEventClearSessionCacheForAllUsers ClusterEvent = "inv_all_user_sessions"
|
||||
ClusterEventInstallPlugin ClusterEvent = "install_plugin"
|
||||
|
||||
@@ -281,6 +281,8 @@ type PostCountOptions struct {
|
||||
MustHaveHashtag bool
|
||||
ExcludeDeleted bool
|
||||
UsersPostsOnly bool
|
||||
// AllowFromCache looks up cache only when ExcludeDeleted and UsersPostsOnly are true and rest are falsy.
|
||||
AllowFromCache bool
|
||||
}
|
||||
|
||||
func (o *Post) Etag() string {
|
||||
|
||||
Ссылка в новой задаче
Block a user