9 references to Size
Microsoft.Extensions.Caching.Memory (9)
MemoryCache.cs (9)
121if (_options.HasSizeLimit && entry.Size < 0) 123throw new InvalidOperationException(SR.Format(SR.CacheEntryHasEmptySize, nameof(entry.Size), nameof(_options.SizeLimit))); 188Interlocked.Add(ref coherentState._cacheSize, -entry.Size + (priorEntry?.Size).GetValueOrDefault()); 283Interlocked.Add(ref coherentState._cacheSize, -entry.Size); 455long newSize = sizeRead + entry.Size; 459newSize -= priorEntry.Size; 517Compact(currentSize - (long)lowWatermark, entry => entry.Size, coherentState); 694Interlocked.Add(ref _cacheSize, -entry.Size);