feat(channel): enhance channel status management

This commit is contained in:
CaIon
2025-07-10 17:49:53 +08:00
parent b8966a8b1c
commit 8e11b67ece
16 changed files with 363 additions and 119 deletions
+13
View File
@@ -203,3 +203,16 @@ func CacheUpdateChannelStatus(id int, status int) {
channel.Status = status
}
}
func CacheUpdateChannel(channel *Channel) {
if !common.MemoryCacheEnabled {
return
}
channelSyncLock.Lock()
defer channelSyncLock.Unlock()
if channel == nil {
return
}
channelsIDM[channel.Id] = channel
}