Update cache.go

This commit is contained in:
xqx333
2024-12-17 12:10:05 +08:00
committed by GitHub
parent 4163713714
commit 739c0cc334

View File

@@ -342,3 +342,14 @@ func CacheGetChannel(id int) (*Channel, error) {
}
return c, nil
}
func CacheUpdateChannelStatus(id int, status int) {
if (!common.MemoryCacheEnabled) {
return
}
channelSyncLock.Lock()
defer channelSyncLock.Unlock()
if channel, ok := channelsIDM[id]; ok {
channel.Status = status
}
}