chore: add MEMORY_CACHE_ENABLED env variable

This commit is contained in:
JustSong
2023-09-29 11:38:27 +08:00
parent fd98463611
commit f9b748c2ca
5 changed files with 25 additions and 22 deletions

View File

@@ -186,7 +186,7 @@ func SyncChannelCache(frequency int) {
}
func CacheGetRandomSatisfiedChannel(group string, model string) (*Channel, error) {
if !common.RedisEnabled {
if !common.MemoryCacheEnabled {
return GetRandomSatisfiedChannel(group, model)
}
channelSyncLock.RLock()