MM-20100: Migrate channelGuestCountsCache cache from store/sqlstore/channel_store.go to the new store/localcachelayer (#13135)
* init * migrate * add test * fix channel store * ... * missing ')' * change function interface * fix build * fix format * Update store/localcachelayer/layer.go Co-Authored-By: Bot from GolangCI <42910462+golangcibot@users.noreply.github.com> * Update store/localcachelayer/channel_guest_layer_test.go Co-Authored-By: Bot from GolangCI <42910462+golangcibot@users.noreply.github.com> * im so confused why my builds are failing * fix build * format * fix format * add license header * resolve some conflicts * add test * fix constant names * fix more constants * fix bugs * delete unused constants * Update store/localcachelayer/channel_layer.go Co-Authored-By: Bot from GolangCI <42910462+golangcibot@users.noreply.github.com> * typo * another typo * get guest * change test * go fmt format * change test * remove getcountcache * delete method from interface * delete method * update test * rerun GoLang CI
Этот коммит содержится в:
коммит произвёл
Devin Binnie
родитель
31ac88ef69
Коммит
fdec1ef1f5
@@ -984,22 +984,6 @@ func (s *TimerLayerChannelStore) GetGuestCount(channelId string, allowFromCache
|
||||
return resultVar0, resultVar1
|
||||
}
|
||||
|
||||
func (s *TimerLayerChannelStore) GetGuestCountFromCache(channelId string) int64 {
|
||||
start := timemodule.Now()
|
||||
|
||||
resultVar0 := s.ChannelStore.GetGuestCountFromCache(channelId)
|
||||
|
||||
elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
|
||||
if s.Root.Metrics != nil {
|
||||
success := "false"
|
||||
if true {
|
||||
success = "true"
|
||||
}
|
||||
s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.GetGuestCountFromCache", success, elapsed)
|
||||
}
|
||||
return resultVar0
|
||||
}
|
||||
|
||||
func (s *TimerLayerChannelStore) GetMember(channelId string, userId string) (*model.ChannelMember, *model.AppError) {
|
||||
start := timemodule.Now()
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user