PLT-4853 Adding cache purging to the server (server) (#4735)

* PLT-4853 Adding caching invalidation to HA

* PLT-4853 Adding cach purging to the server
Этот коммит содержится в:
Corey Hulen
2016-12-08 07:18:15 -08:00
коммит произвёл Harrison Healey
родитель 7acd135e02
Коммит c4974374d9
12 изменённых файлов: 76 добавлений и 10 удалений

Просмотреть файл

@@ -33,6 +33,11 @@ type SqlChannelStore struct {
var channelMemberCountsCache = utils.NewLru(CHANNEL_MEMBERS_COUNTS_CACHE_SIZE)
var allChannelMembersForUserCache = utils.NewLru(ALL_CHANNEL_MEMBERS_FOR_USER_CACHE_SIZE)
func ClearChannelCaches() {
channelMemberCountsCache.Purge()
allChannelMembersForUserCache.Purge()
}
func NewSqlChannelStore(sqlStore *SqlStore) ChannelStore {
s := &SqlChannelStore{sqlStore}

Просмотреть файл

@@ -35,6 +35,10 @@ type SqlUserStore struct {
var profilesInChannelCache *utils.Cache = utils.NewLru(PROFILES_IN_CHANNEL_CACHE_SIZE)
func ClearUserCaches() {
profilesInChannelCache.Purge()
}
func NewSqlUserStore(sqlStore *SqlStore) UserStore {
us := &SqlUserStore{sqlStore}