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