move GC and GetSize to control commands

This commit is contained in:
Karl Seguin
2021-03-20 18:57:11 +08:00
parent 934f76bc44
commit 325d078286
5 changed files with 98 additions and 54 deletions

View File

@@ -97,10 +97,10 @@ func (_ SecondaryCacheTests) TrackerDoesNotCleanupHeldInstance() {
sCache := cache.GetOrCreateSecondaryCache("0")
item := sCache.TrackingGet("a")
time.Sleep(time.Millisecond * 10)
gcLayeredCache(cache)
cache.GC()
Expect(cache.Get("0", "a").Value()).To.Equal(0)
Expect(cache.Get("1", "a")).To.Equal(nil)
item.Release()
gcLayeredCache(cache)
cache.GC()
Expect(cache.Get("0", "a")).To.Equal(nil)
}