ソースを参照

added in-memory

Achilleas Tzenetopoulos 5 年 前
コミット
9663f1df0a

+ 2 - 1
kubernetes-v1.15.4/pkg/scheduler/algorithm/priorities/custom_resource_allocation.go

@@ -111,8 +111,9 @@ func InvalidateCache() {
 	// clean the cache if 10 seconds are passed
 	case <-customcache.LabCache.Timeout.C:
 		klog.Infof("Time to erase")
-		customcache.LabCache.Timeout.Stop()
+		//customcache.LabCache.Timeout.Stop()
 		customcache.LabCache.CleanCache()
+
 	default:
 	}
 }

+ 1 - 1
kubernetes-v1.15.4/pkg/scheduler/customcache/cache.go

@@ -66,7 +66,7 @@ func init() {
 				"c6res":     -1,
 			},
 		},
-		//Timeout: time.NewTicker(time.Duration(10 * time.Second)),
+		Timeout: time.NewTicker(time.Duration(10) * time.Second),
 	}
 }