1 write to _options
Microsoft.Extensions.Caching.Memory (1)
MemoryCache.cs (1)
51
_options
= optionsAccessor.Value;
19 references to _options
Microsoft.Extensions.Caching.Memory (19)
MemoryCache.cs (19)
56
if (
_options
.TrackStatistics)
64
TrackLinkedCacheEntries =
_options
.TrackLinkedCacheEntries; // we store the setting now so it's consistent for entire MemoryCache lifetime
67
private DateTime UtcNow =>
_options
.Clock?.UtcNow.UtcDateTime ?? DateTime.UtcNow;
120
if (
_options
.HasSizeLimit && entry.Size < 0)
122
throw new InvalidOperationException(SR.Format(SR.CacheEntryHasEmptySize, nameof(entry.Size), nameof(
_options
.SizeLimit)));
153
coherentState.RemoveEntry(priorEntry,
_options
);
171
if (
_options
.HasSizeLimit)
192
if (
_options
.HasSizeLimit)
210
coherentState.RemoveEntry(priorEntry,
_options
);
259
coherentState.RemoveEntry(entry,
_options
);
288
if (
_options
.HasSizeLimit)
329
CurrentEstimatedSize =
_options
.SizeLimit.HasValue ? Size : null
339
_coherentState.RemoveEntry(entry,
_options
);
348
if (
_options
.ExpirationScanFrequency < utcNow - _lastExpirationScan)
438
coherentState.RemoveEntry(entry,
_options
);
449
long sizeLimit =
_options
.SizeLimitValue;
494
long sizeLimit =
_options
.SizeLimitValue;
497
long lowWatermark = sizeLimit - (long)(sizeLimit *
_options
.CompactionPercentage);
568
coherentState.RemoveEntry(entry,
_options
);