MM-59934: Add Redis to CI and other improvements (#28164)
- Update library version. - Added MaxFlush delay to help reduce CPU usage. - Fall back to LRU cache for the caches which use SCAN. - Added mattermost-redis and running for all api layer tests in Postgres. https://mattermost.atlassian.net/browse/MM-59934 ```release-note NONE ```
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
02dfc2d205
Коммит
75ed2860ac
@@ -340,7 +340,8 @@ func NewLocalCacheLayer(baseStore store.Store, metrics einterfaces.MetricsInterf
|
||||
}); err != nil {
|
||||
return
|
||||
}
|
||||
if localCacheStore.profilesInChannelCache, err = cacheProvider.NewCache(&cache.CacheOptions{
|
||||
// Hardcoding this to LRU because of the volume of SCAN calls in case of Redis.
|
||||
if localCacheStore.profilesInChannelCache, err = cache.NewProvider().NewCache(&cache.CacheOptions{
|
||||
Size: ProfilesInChannelCacheSize,
|
||||
Name: "ProfilesInChannel",
|
||||
DefaultExpiry: ProfilesInChannelCacheSec * time.Second,
|
||||
@@ -526,7 +527,10 @@ func (s *LocalCacheStore) doMultiReadCache(cache cache.Cache, keys []string, val
|
||||
}
|
||||
|
||||
func (s *LocalCacheStore) doClearCacheCluster(cache cache.Cache) {
|
||||
cache.Purge()
|
||||
err := cache.Purge()
|
||||
if err != nil {
|
||||
s.logger.Warn("Error while purging cache", mlog.Err(err), mlog.String("cache_name", cache.Name()))
|
||||
}
|
||||
if s.cluster != nil && s.cacheType == model.CacheTypeLRU {
|
||||
msg := &model.ClusterMessage{
|
||||
Event: cache.GetInvalidateClusterEvent(),
|
||||
|
||||
Ссылка в новой задаче
Block a user