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