5 writes to _cacheSize
Microsoft.Extensions.Caching.Memory (5)
MemoryCache.cs (5)
182
Interlocked.Add(ref coherentState.
_cacheSize
, -entry.Size + (priorEntry?.Size).GetValueOrDefault());
331
Interlocked.Add(ref coherentState.
_cacheSize
, -entry.Size);
511
long original = Interlocked.CompareExchange(ref coherentState.
_cacheSize
, newSize, sizeRead);
782
internal long Size => Volatile.Read(ref
_cacheSize
);
796
Interlocked.Add(ref
_cacheSize
, -entry.Size);