5 writes to _cacheSize
Microsoft.Extensions.Caching.Memory (5)
MemoryCache.cs (5)
188
Interlocked.Add(ref coherentState.
_cacheSize
, -entry.Size + (priorEntry?.Size).GetValueOrDefault());
283
Interlocked.Add(ref coherentState.
_cacheSize
, -entry.Size);
468
long original = Interlocked.CompareExchange(ref coherentState.
_cacheSize
, newSize, sizeRead);
686
internal long Size => Volatile.Read(ref
_cacheSize
);
694
Interlocked.Add(ref
_cacheSize
, -entry.Size);