6 writes to _cacheSize
Microsoft.Extensions.Caching.Memory (6)
MemoryCache.cs (6)
182
Interlocked.Add(ref coherentState.
_cacheSize
, -entry.Size + (priorEntry?.Size).GetValueOrDefault());
278
Interlocked.Add(ref coherentState.
_cacheSize
, -entry.Size);
462
long original = Interlocked.CompareExchange(ref coherentState.
_cacheSize
, newSize, sizeRead);
721
internal long Size => Volatile.Read(ref
_cacheSize
);
731
Interlocked.Add(ref
_cacheSize
, -entry.Size);
740
Interlocked.Add(ref
_cacheSize
, -entry.Size);