9 references to Size
Microsoft.Extensions.Caching.Memory (9)
MemoryCache.cs (9)
131if (_options.HasSizeLimit && entry.Size < 0) 133throw new InvalidOperationException(SR.Format(SR.CacheEntryHasEmptySize, nameof(entry.Size), nameof(_options.SizeLimit))); 198Interlocked.Add(ref coherentState._cacheSize, -entry.Size + (priorEntry?.Size).GetValueOrDefault()); 350Interlocked.Add(ref coherentState._cacheSize, -entry.Size); 540long newSize = sizeRead + entry.Size; 544newSize -= priorEntry.Size; 602Compact(currentSize - (long)lowWatermark, entry => entry.Size, coherentState); 847Interlocked.Add(ref _cacheSize, -entry.Size);