MCPcopy Create free account
hub / github.com/QuantumNous/new-api / refreshChannelRuntimeCache

Function refreshChannelRuntimeCache

controller/channel_upstream_update.go:405–417  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

403}
404
405func refreshChannelRuntimeCache() {
406 if common.MemoryCacheEnabled {
407 func() {
408 defer func() {
409 if r := recover(); r != nil {
410 common.SysLog(fmt.Sprintf("InitChannelCache panic: %v", r))
411 }
412 }()
413 model.InitChannelCache()
414 }()
415 }
416 service.ResetProxyClientCache()
417}
418
419func shouldSendUpstreamModelUpdateNotification(now int64, changedChannels int, failedChannels int) bool {
420 if changedChannels <= 0 && failedChannels <= 0 {

Calls 3

SysLogFunction · 0.92
InitChannelCacheFunction · 0.92
ResetProxyClientCacheFunction · 0.92

Tested by

no test coverage detected