6 writes to _cacheSize
Microsoft.Extensions.Caching.Memory (6)
MemoryCache.cs (6)
174
Interlocked.Add(ref coherentState.
_cacheSize
, -priorEntry.Size);
195
Interlocked.Add(ref coherentState.
_cacheSize
, -entry.Size);
290
Interlocked.Add(ref coherentState.
_cacheSize
, -entry.Size);
466
long original = Interlocked.CompareExchange(ref coherentState.
_cacheSize
, newSize, sizeRead);
669
internal long Size => Volatile.Read(ref
_cacheSize
);
677
Interlocked.Add(ref
_cacheSize
, -entry.Size);