MCPcopy Create free account
hub / github.com/GoEdgeLab/EdgeNode / startFlush

Method startFlush

internal/caches/storage_memory.go:500–516  ·  view source on GitHub ↗

开始Flush任务

()

Source from the content-addressed store, hash-verified

498
499// 开始Flush任务
500func (this *MemoryStorage) startFlush() {
501 var statCount = 0
502
503 for key := range this.dirtyChan {
504 statCount++
505
506 if statCount == 100 {
507 statCount = 0
508 }
509
510 this.flushItem(key)
511
512 if fsutils.IsInExtremelyHighLoad {
513 time.Sleep(1 * time.Second)
514 }
515 }
516}
517
518// 单次Flush任务
519func (this *MemoryStorage) flushItem(fullKey string) {

Callers 1

InitMethod · 0.95

Calls 1

flushItemMethod · 0.95

Tested by

no test coverage detected