2 instantiations of Stats
Microsoft.Extensions.Caching.Memory (2)
MemoryCache.cs (2)
62_accumulatedStats = new Stats(); 63_stats = new ThreadLocal<Stats>(() => new Stats(this));
12 references to Stats
Microsoft.Extensions.Caching.Memory (12)
MemoryCache.cs (12)
30private readonly List<WeakReference<Stats>>? _allStats; 31private readonly Stats? _accumulatedStats; 32private readonly ThreadLocal<Stats>? _stats; 61_allStats = new List<WeakReference<Stats>>(); 63_stats = new ThreadLocal<Stats>(() => new Stats(this)); 356foreach (WeakReference<Stats> wr in _allStats) 358if (wr.TryGetTarget(out Stats? stats)) 369private Stats GetStats() => _stats!.Value!; 388private void RemoveFromStats(Stats current) 394if (!_allStats[i].TryGetTarget(out Stats? stats)) 407private void AddToStats(Stats current) 411_allStats.Add(new WeakReference<Stats>(current));