summaryrefslogtreecommitdiffstats
path: root/store/store.go
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2018-03-05 10:35:26 -0500
committerGitHub <noreply@github.com>2018-03-05 10:35:26 -0500
commit4a1802c039a0db2d97e8351c462963a99da857bf (patch)
treef083e9cd2c21434a6eba2dca7f90c127514bf727 /store/store.go
parentfbff94f3be1bf596f2b94f593687d3b162413de9 (diff)
downloadchat-4a1802c039a0db2d97e8351c462963a99da857bf.tar.gz
chat-4a1802c039a0db2d97e8351c462963a99da857bf.tar.bz2
chat-4a1802c039a0db2d97e8351c462963a99da857bf.zip
MM-9664 Add invalidation metrics for store caches (#8340)
* Add invalidation metrics for store caches * Increment session invalidation metric * Fix tests
Diffstat (limited to 'store/store.go')
-rw-r--r--store/store.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/store/store.go b/store/store.go
index 9435a6f61..0394277b7 100644
--- a/store/store.go
+++ b/store/store.go
@@ -161,6 +161,7 @@ type ChannelStore interface {
GetMembersByIds(channelId string, userIds []string) StoreChannel
AnalyticsDeletedTypeCount(teamId string, channelType string) StoreChannel
GetChannelUnread(channelId, userId string) StoreChannel
+ ClearCaches()
}
type ChannelMemberHistoryStore interface {
@@ -190,6 +191,7 @@ type PostStore interface {
AnalyticsUserCountsWithPostsByDay(teamId string) StoreChannel
AnalyticsPostCountsByDay(teamId string) StoreChannel
AnalyticsPostCount(teamId string, mustHaveFile bool, mustHaveHashtag bool) StoreChannel
+ ClearCaches()
InvalidateLastPostTimeCache(channelId string)
GetPostsCreatedAt(channelId string, time int64) StoreChannel
Overwrite(post *model.Post) StoreChannel
@@ -210,6 +212,7 @@ type UserStore interface {
UpdateMfaActive(userId string, active bool) StoreChannel
Get(id string) StoreChannel
GetAll() StoreChannel
+ ClearCaches()
InvalidateProfilesInChannelCacheByUser(userId string)
InvalidateProfilesInChannelCache(channelId string)
GetProfilesInChannel(channelId string, offset int, limit int) StoreChannel
@@ -343,6 +346,7 @@ type WebhookStore interface {
AnalyticsIncomingCount(teamId string) StoreChannel
AnalyticsOutgoingCount(teamId string) StoreChannel
InvalidateWebhookCache(webhook string)
+ ClearCaches()
}
type CommandStore interface {
@@ -420,6 +424,7 @@ type FileInfoStore interface {
DeleteForPost(postId string) StoreChannel
PermanentDelete(fileId string) StoreChannel
PermanentDeleteBatch(endTime int64, limit int64) StoreChannel
+ ClearCaches()
}
type ReactionStore interface {