10 references to Size
Microsoft.Extensions.Caching.Memory (10)
MemoryCache.cs (10)
131if (_options.HasSizeLimit && entry.Size < 0) 133throw new InvalidOperationException(SR.Format(SR.CacheEntryHasEmptySize, nameof(entry.Size), nameof(_options.SizeLimit))); 190Interlocked.Add(ref coherentState._cacheSize, -priorEntry.Size); 212Interlocked.Add(ref coherentState._cacheSize, -entry.Size); 364Interlocked.Add(ref coherentState._cacheSize, -entry.Size); 551long priorSize = priorEntry?.Size ?? 0; 562long sizeAfterReplace = sizeRead + entry.Size - priorSize; 570long committedSize = sizeRead + entry.Size; 620Compact(currentSize - (long)lowWatermark, entry => entry.Size, coherentState); 865Interlocked.Add(ref _cacheSize, -entry.Size);