10 references to Size
Microsoft.Extensions.Caching.Memory (10)
MemoryCache.cs (10)
136if (_options.HasSizeLimit && entry.Size < 0) 138throw new InvalidOperationException(SR.Format(SR.CacheEntryHasEmptySize, nameof(entry.Size), nameof(_options.SizeLimit))); 195Interlocked.Add(ref coherentState.CacheSize, -priorEntry.Size); 217Interlocked.Add(ref coherentState.CacheSize, -entry.Size); 369Interlocked.Add(ref coherentState.CacheSize, -entry.Size); 556long priorSize = priorEntry?.Size ?? 0; 567long sizeAfterReplace = sizeRead + entry.Size - priorSize; 575long committedSize = sizeRead + entry.Size; 625Compact(currentSize - (long)lowWatermark, entry => entry.Size, coherentState); 884Interlocked.Add(ref CacheSize, -entry.Size);