Documentation
¶
Index ¶
- Constants
- type LocalCacheChannelStore
- func (s LocalCacheChannelStore) ClearAllCustomRoleAssignments() *model.AppError
- func (s LocalCacheChannelStore) ClearCaches()
- func (s LocalCacheChannelStore) Get(id string, allowFromCache bool) (*model.Channel, *model.AppError)
- func (s LocalCacheChannelStore) GetGuestCount(channelId string, allowFromCache bool) (int64, *model.AppError)
- func (s LocalCacheChannelStore) GetMemberCount(channelId string, allowFromCache bool) (int64, *model.AppError)
- func (s LocalCacheChannelStore) GetMemberCountFromCache(channelId string) int64
- func (s LocalCacheChannelStore) GetMembersForUser(teamId, userId string) (*model.ChannelMembers, *model.AppError)
- func (s LocalCacheChannelStore) GetPinnedPostCount(channelId string, allowFromCache bool) (int64, *model.AppError)
- func (s LocalCacheChannelStore) IncrementMentionCount(channelId, userId string) *model.AppError
- func (s LocalCacheChannelStore) InvalidateChannel(channelId string)
- func (s LocalCacheChannelStore) InvalidateGuestCount(channelId string)
- func (s LocalCacheChannelStore) InvalidateMemberCount(channelId string)
- func (s LocalCacheChannelStore) InvalidatePinnedPostCount(channelId string)
- func (s LocalCacheChannelStore) PermanentDeleteMembersByChannel(channelId string) *model.AppError
- func (s LocalCacheChannelStore) PermanentDeleteMembersByUser(userId string) *model.AppError
- func (s LocalCacheChannelStore) RemoveAllDeactivatedMembers(channelId string) *model.AppError
- func (s LocalCacheChannelStore) RemoveMember(channelId, userId string) *model.AppError
- func (s LocalCacheChannelStore) SaveMember(member *model.ChannelMember) (*model.ChannelMember, *model.AppError)
- func (s LocalCacheChannelStore) UpdateLastViewedAt(channelIds []string, userId string) (map[string]int64, *model.AppError)
- func (s LocalCacheChannelStore) UpdateLastViewedAtPost(unreadPost *model.Post, userID string, mentionCount int) (*model.ChannelUnreadAt, *model.AppError)
- func (s LocalCacheChannelStore) UpdateMember(member *model.ChannelMember) (*model.ChannelMember, *model.AppError)
- type LocalCacheEmojiStore
- type LocalCachePostStore
- func (s LocalCachePostStore) ClearCaches()
- func (s LocalCachePostStore) GetEtag(channelId string, allowFromCache bool) string
- func (s LocalCachePostStore) GetPosts(channelId string, offset int, limit int, allowFromCache bool) (*model.PostList, *model.AppError)
- func (s LocalCachePostStore) GetPostsSince(channelId string, time int64, allowFromCache bool) (*model.PostList, *model.AppError)
- func (s LocalCachePostStore) InvalidateLastPostTimeCache(channelId string)
- type LocalCacheReactionStore
- func (s LocalCacheReactionStore) Delete(reaction *model.Reaction) (*model.Reaction, *model.AppError)
- func (s LocalCacheReactionStore) DeleteAllWithEmojiName(emojiName string) *model.AppError
- func (s LocalCacheReactionStore) GetForPost(postId string, allowFromCache bool) ([]*model.Reaction, *model.AppError)
- func (s LocalCacheReactionStore) Save(reaction *model.Reaction) (*model.Reaction, *model.AppError)
- type LocalCacheRoleStore
- func (s LocalCacheRoleStore) Delete(roleId string) (*model.Role, *model.AppError)
- func (s LocalCacheRoleStore) GetByName(name string) (*model.Role, *model.AppError)
- func (s LocalCacheRoleStore) GetByNames(names []string) ([]*model.Role, *model.AppError)
- func (s LocalCacheRoleStore) PermanentDeleteAll() *model.AppError
- func (s LocalCacheRoleStore) Save(role *model.Role) (*model.Role, *model.AppError)
- type LocalCacheSchemeStore
- func (s LocalCacheSchemeStore) Delete(schemeId string) (*model.Scheme, *model.AppError)
- func (s LocalCacheSchemeStore) Get(schemeId string) (*model.Scheme, *model.AppError)
- func (s LocalCacheSchemeStore) PermanentDeleteAll() *model.AppError
- func (s LocalCacheSchemeStore) Save(scheme *model.Scheme) (*model.Scheme, *model.AppError)
- type LocalCacheStore
- func (s LocalCacheStore) Channel() store.ChannelStore
- func (s LocalCacheStore) DropAllTables()
- func (s LocalCacheStore) Emoji() store.EmojiStore
- func (s *LocalCacheStore) Invalidate()
- func (s LocalCacheStore) Post() store.PostStore
- func (s LocalCacheStore) Reaction() store.ReactionStore
- func (s LocalCacheStore) Role() store.RoleStore
- func (s LocalCacheStore) Scheme() store.SchemeStore
- func (s LocalCacheStore) Team() store.TeamStore
- func (s LocalCacheStore) TermsOfService() store.TermsOfServiceStore
- func (s LocalCacheStore) User() store.UserStore
- func (s LocalCacheStore) Webhook() store.WebhookStore
- type LocalCacheTeamStore
- func (s LocalCacheTeamStore) ClearCaches()
- func (s LocalCacheTeamStore) GetUserTeamIds(userID string, allowFromCache bool) ([]string, *model.AppError)
- func (s LocalCacheTeamStore) InvalidateAllTeamIdsForUser(userId string)
- func (s LocalCacheTeamStore) Update(team *model.Team) (*model.Team, *model.AppError)
- type LocalCacheTermsOfServiceStore
- func (s LocalCacheTermsOfServiceStore) ClearCaches()
- func (s LocalCacheTermsOfServiceStore) Get(id string, allowFromCache bool) (*model.TermsOfService, *model.AppError)
- func (s LocalCacheTermsOfServiceStore) GetLatest(allowFromCache bool) (*model.TermsOfService, *model.AppError)
- func (s LocalCacheTermsOfServiceStore) Save(termsOfService *model.TermsOfService) (*model.TermsOfService, *model.AppError)
- type LocalCacheUserStore
- func (s LocalCacheUserStore) ClearCaches()
- func (s LocalCacheUserStore) GetAllProfilesInChannel(channelId string, allowFromCache bool) (map[string]*model.User, *model.AppError)
- func (s LocalCacheUserStore) GetProfileByIds(userIds []string, options *store.UserGetByIdsOpts, allowFromCache bool) ([]*model.User, *model.AppError)
- func (s LocalCacheUserStore) InvalidateProfileCacheForUser(userId string)
- func (s LocalCacheUserStore) InvalidateProfilesInChannelCache(channelId string)
- func (s LocalCacheUserStore) InvalidateProfilesInChannelCacheByUser(userId string)
- type LocalCacheWebhookStore
- func (s LocalCacheWebhookStore) ClearCaches()
- func (s LocalCacheWebhookStore) DeleteIncoming(webhookId string, time int64) *model.AppError
- func (s LocalCacheWebhookStore) GetIncoming(id string, allowFromCache bool) (*model.IncomingWebhook, *model.AppError)
- func (s LocalCacheWebhookStore) InvalidateWebhookCache(webhookId string)
- func (s LocalCacheWebhookStore) PermanentDeleteIncomingByChannel(channelId string) *model.AppError
- func (s LocalCacheWebhookStore) PermanentDeleteIncomingByUser(userId string) *model.AppError
Constants ¶
const ( REACTION_CACHE_SIZE = 20000 REACTION_CACHE_SEC = 30 * 60 ROLE_CACHE_SIZE = 20000 ROLE_CACHE_SEC = 30 * 60 SCHEME_CACHE_SIZE = 20000 SCHEME_CACHE_SEC = 30 * 60 CHANNEL_GUEST_COUNT_CACHE_SIZE = model.CHANNEL_CACHE_SIZE CHANNEL_GUEST_COUNT_CACHE_SEC = 30 * 60 WEBHOOK_CACHE_SIZE = 25000 WEBHOOK_CACHE_SEC = 15 * 60 EMOJI_CACHE_SIZE = 5000 EMOJI_CACHE_SEC = 30 * 60 CHANNEL_PINNEDPOSTS_COUNTS_CACHE_SIZE = model.CHANNEL_CACHE_SIZE CHANNEL_PINNEDPOSTS_COUNTS_CACHE_SEC = 30 * 60 CHANNEL_MEMBERS_COUNTS_CACHE_SIZE = model.CHANNEL_CACHE_SIZE CHANNEL_MEMBERS_COUNTS_CACHE_SEC = 30 * 60 CHANNEL_MEMBERS_FOR_USER_SIZE = model.CHANNEL_CACHE_SIZE CHANNEL_MEMBERS_FOR_USER_CACHE_SEC = 30 * 60 LAST_POSTS_CACHE_SIZE = 20000 LAST_POSTS_CACHE_SEC = 30 * 60 TERMS_OF_SERVICE_CACHE_SIZE = 20000 TERMS_OF_SERVICE_CACHE_SEC = 30 * 60 LAST_POST_TIME_CACHE_SIZE = 25000 LAST_POST_TIME_CACHE_SEC = 15 * 60 USER_PROFILE_BY_ID_CACHE_SIZE = 20000 USER_PROFILE_BY_ID_SEC = 30 * 60 PROFILES_IN_CHANNEL_CACHE_SIZE = model.CHANNEL_CACHE_SIZE PROFILES_IN_CHANNEL_CACHE_SEC = 15 * 60 TEAM_CACHE_SIZE = 20000 TEAM_CACHE_SEC = 30 * 60 CLEAR_CACHE_MESSAGE_DATA = "" CHANNEL_CACHE_SEC = 15 * 60 // 15 mins )
const (
LATEST_KEY = "latest"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LocalCacheChannelStore ¶ added in v5.20.0
type LocalCacheChannelStore struct { store.ChannelStore // contains filtered or unexported fields }
func (LocalCacheChannelStore) ClearAllCustomRoleAssignments ¶ added in v5.20.0
func (s LocalCacheChannelStore) ClearAllCustomRoleAssignments() *model.AppError
ClearAllCustomRoleAssignments is a wrapper method for the underlying store which just takes care of the cache invalidation.
func (LocalCacheChannelStore) ClearCaches ¶ added in v5.20.0
func (s LocalCacheChannelStore) ClearCaches()
func (LocalCacheChannelStore) GetGuestCount ¶ added in v5.20.0
func (LocalCacheChannelStore) GetMemberCount ¶ added in v5.20.0
func (LocalCacheChannelStore) GetMemberCountFromCache ¶ added in v5.20.0
func (s LocalCacheChannelStore) GetMemberCountFromCache(channelId string) int64
func (LocalCacheChannelStore) GetMembersForUser ¶ added in v5.20.0
func (s LocalCacheChannelStore) GetMembersForUser(teamId, userId string) (*model.ChannelMembers, *model.AppError)
GetMembersForUser is a cache wrapper method for ChannelStore.
func (LocalCacheChannelStore) GetPinnedPostCount ¶ added in v5.20.0
func (LocalCacheChannelStore) IncrementMentionCount ¶ added in v5.20.0
func (s LocalCacheChannelStore) IncrementMentionCount(channelId, userId string) *model.AppError
IncrementMentionCount is a wrapper method for the underlying store which just takes care of the cache invalidation.
func (LocalCacheChannelStore) InvalidateChannel ¶ added in v5.20.0
func (s LocalCacheChannelStore) InvalidateChannel(channelId string)
func (LocalCacheChannelStore) InvalidateGuestCount ¶ added in v5.20.0
func (s LocalCacheChannelStore) InvalidateGuestCount(channelId string)
func (LocalCacheChannelStore) InvalidateMemberCount ¶ added in v5.20.0
func (s LocalCacheChannelStore) InvalidateMemberCount(channelId string)
func (LocalCacheChannelStore) InvalidatePinnedPostCount ¶ added in v5.20.0
func (s LocalCacheChannelStore) InvalidatePinnedPostCount(channelId string)
func (LocalCacheChannelStore) PermanentDeleteMembersByChannel ¶ added in v5.20.0
func (s LocalCacheChannelStore) PermanentDeleteMembersByChannel(channelId string) *model.AppError
PermanentDeleteMembersByChannel is a wrapper method for the underlying store which just takes care of the cache invalidation.
func (LocalCacheChannelStore) PermanentDeleteMembersByUser ¶ added in v5.20.0
func (s LocalCacheChannelStore) PermanentDeleteMembersByUser(userId string) *model.AppError
PermanentDeleteMembersByUser is a wrapper method for the underlying store which just takes care of the cache invalidation.
func (LocalCacheChannelStore) RemoveAllDeactivatedMembers ¶ added in v5.20.0
func (s LocalCacheChannelStore) RemoveAllDeactivatedMembers(channelId string) *model.AppError
RemoveAllDeactivatedMembers is a wrapper method for the underlying store which just takes care of the cache invalidation.
func (LocalCacheChannelStore) RemoveMember ¶ added in v5.20.0
func (s LocalCacheChannelStore) RemoveMember(channelId, userId string) *model.AppError
RemoveMember is a wrapper method for the underlying store which just takes care of the cache invalidation.
func (LocalCacheChannelStore) SaveMember ¶ added in v5.20.0
func (s LocalCacheChannelStore) SaveMember(member *model.ChannelMember) (*model.ChannelMember, *model.AppError)
SaveMember is a wrapper method for the underlying store which just takes care of the cache invalidation.
func (LocalCacheChannelStore) UpdateLastViewedAt ¶ added in v5.20.0
func (s LocalCacheChannelStore) UpdateLastViewedAt(channelIds []string, userId string) (map[string]int64, *model.AppError)
UpdateLastViewedAt is a wrapper method for the underlying store which just takes care of the cache invalidation.
func (LocalCacheChannelStore) UpdateLastViewedAtPost ¶ added in v5.20.0
func (s LocalCacheChannelStore) UpdateLastViewedAtPost(unreadPost *model.Post, userID string, mentionCount int) (*model.ChannelUnreadAt, *model.AppError)
UpdateLastViewedAtPost is a wrapper method for the underlying store which just takes care of the cache invalidation.
func (LocalCacheChannelStore) UpdateMember ¶ added in v5.20.0
func (s LocalCacheChannelStore) UpdateMember(member *model.ChannelMember) (*model.ChannelMember, *model.AppError)
UpdateMember is a wrapper method for the underlying store which just takes care of the cache invalidation.
type LocalCacheEmojiStore ¶ added in v5.20.0
type LocalCacheEmojiStore struct { store.EmojiStore // contains filtered or unexported fields }
type LocalCachePostStore ¶ added in v5.20.0
func (LocalCachePostStore) ClearCaches ¶ added in v5.20.0
func (s LocalCachePostStore) ClearCaches()
func (LocalCachePostStore) GetEtag ¶ added in v5.20.0
func (s LocalCachePostStore) GetEtag(channelId string, allowFromCache bool) string
func (LocalCachePostStore) GetPostsSince ¶ added in v5.20.0
func (LocalCachePostStore) InvalidateLastPostTimeCache ¶ added in v5.20.0
func (s LocalCachePostStore) InvalidateLastPostTimeCache(channelId string)
type LocalCacheReactionStore ¶
type LocalCacheReactionStore struct { store.ReactionStore // contains filtered or unexported fields }
func (LocalCacheReactionStore) DeleteAllWithEmojiName ¶
func (s LocalCacheReactionStore) DeleteAllWithEmojiName(emojiName string) *model.AppError
func (LocalCacheReactionStore) GetForPost ¶
type LocalCacheRoleStore ¶
func (LocalCacheRoleStore) GetByNames ¶
func (LocalCacheRoleStore) PermanentDeleteAll ¶
func (s LocalCacheRoleStore) PermanentDeleteAll() *model.AppError
type LocalCacheSchemeStore ¶
type LocalCacheSchemeStore struct { store.SchemeStore // contains filtered or unexported fields }
func (LocalCacheSchemeStore) PermanentDeleteAll ¶
func (s LocalCacheSchemeStore) PermanentDeleteAll() *model.AppError
type LocalCacheStore ¶
func NewLocalCacheLayer ¶
func NewLocalCacheLayer(baseStore store.Store, metrics einterfaces.MetricsInterface, cluster einterfaces.ClusterInterface, cacheProvider cache.Provider) LocalCacheStore
func (LocalCacheStore) Channel ¶ added in v5.20.0
func (s LocalCacheStore) Channel() store.ChannelStore
func (LocalCacheStore) DropAllTables ¶
func (s LocalCacheStore) DropAllTables()
func (LocalCacheStore) Emoji ¶ added in v5.20.0
func (s LocalCacheStore) Emoji() store.EmojiStore
func (*LocalCacheStore) Invalidate ¶
func (s *LocalCacheStore) Invalidate()
func (LocalCacheStore) Post ¶ added in v5.20.0
func (s LocalCacheStore) Post() store.PostStore
func (LocalCacheStore) Reaction ¶
func (s LocalCacheStore) Reaction() store.ReactionStore
func (LocalCacheStore) Role ¶
func (s LocalCacheStore) Role() store.RoleStore
func (LocalCacheStore) Scheme ¶
func (s LocalCacheStore) Scheme() store.SchemeStore
func (LocalCacheStore) Team ¶ added in v5.20.0
func (s LocalCacheStore) Team() store.TeamStore
func (LocalCacheStore) TermsOfService ¶ added in v5.20.0
func (s LocalCacheStore) TermsOfService() store.TermsOfServiceStore
func (LocalCacheStore) User ¶ added in v5.20.0
func (s LocalCacheStore) User() store.UserStore
func (LocalCacheStore) Webhook ¶ added in v5.20.0
func (s LocalCacheStore) Webhook() store.WebhookStore
type LocalCacheTeamStore ¶ added in v5.20.0
func (LocalCacheTeamStore) ClearCaches ¶ added in v5.20.0
func (s LocalCacheTeamStore) ClearCaches()
func (LocalCacheTeamStore) GetUserTeamIds ¶ added in v5.20.0
func (LocalCacheTeamStore) InvalidateAllTeamIdsForUser ¶ added in v5.20.0
func (s LocalCacheTeamStore) InvalidateAllTeamIdsForUser(userId string)
type LocalCacheTermsOfServiceStore ¶ added in v5.20.0
type LocalCacheTermsOfServiceStore struct { store.TermsOfServiceStore // contains filtered or unexported fields }
func (LocalCacheTermsOfServiceStore) ClearCaches ¶ added in v5.20.0
func (s LocalCacheTermsOfServiceStore) ClearCaches()
func (LocalCacheTermsOfServiceStore) Get ¶ added in v5.20.0
func (s LocalCacheTermsOfServiceStore) Get(id string, allowFromCache bool) (*model.TermsOfService, *model.AppError)
func (LocalCacheTermsOfServiceStore) GetLatest ¶ added in v5.20.0
func (s LocalCacheTermsOfServiceStore) GetLatest(allowFromCache bool) (*model.TermsOfService, *model.AppError)
func (LocalCacheTermsOfServiceStore) Save ¶ added in v5.20.0
func (s LocalCacheTermsOfServiceStore) Save(termsOfService *model.TermsOfService) (*model.TermsOfService, *model.AppError)
type LocalCacheUserStore ¶ added in v5.20.0
func (LocalCacheUserStore) ClearCaches ¶ added in v5.20.0
func (s LocalCacheUserStore) ClearCaches()
func (LocalCacheUserStore) GetAllProfilesInChannel ¶ added in v5.20.0
func (LocalCacheUserStore) GetProfileByIds ¶ added in v5.20.0
func (s LocalCacheUserStore) GetProfileByIds(userIds []string, options *store.UserGetByIdsOpts, allowFromCache bool) ([]*model.User, *model.AppError)
func (LocalCacheUserStore) InvalidateProfileCacheForUser ¶ added in v5.20.0
func (s LocalCacheUserStore) InvalidateProfileCacheForUser(userId string)
func (LocalCacheUserStore) InvalidateProfilesInChannelCache ¶ added in v5.20.0
func (s LocalCacheUserStore) InvalidateProfilesInChannelCache(channelId string)
func (LocalCacheUserStore) InvalidateProfilesInChannelCacheByUser ¶ added in v5.20.0
func (s LocalCacheUserStore) InvalidateProfilesInChannelCacheByUser(userId string)
type LocalCacheWebhookStore ¶ added in v5.20.0
type LocalCacheWebhookStore struct { store.WebhookStore // contains filtered or unexported fields }
func (LocalCacheWebhookStore) ClearCaches ¶ added in v5.20.0
func (s LocalCacheWebhookStore) ClearCaches()
func (LocalCacheWebhookStore) DeleteIncoming ¶ added in v5.20.0
func (s LocalCacheWebhookStore) DeleteIncoming(webhookId string, time int64) *model.AppError
func (LocalCacheWebhookStore) GetIncoming ¶ added in v5.20.0
func (s LocalCacheWebhookStore) GetIncoming(id string, allowFromCache bool) (*model.IncomingWebhook, *model.AppError)
func (LocalCacheWebhookStore) InvalidateWebhookCache ¶ added in v5.20.0
func (s LocalCacheWebhookStore) InvalidateWebhookCache(webhookId string)
func (LocalCacheWebhookStore) PermanentDeleteIncomingByChannel ¶ added in v5.20.0
func (s LocalCacheWebhookStore) PermanentDeleteIncomingByChannel(channelId string) *model.AppError
func (LocalCacheWebhookStore) PermanentDeleteIncomingByUser ¶ added in v5.20.0
func (s LocalCacheWebhookStore) PermanentDeleteIncomingByUser(userId string) *model.AppError