1 write to _options
Microsoft.Extensions.Caching.Memory (1)
MemoryCache.cs (1)
52
_options
= optionsAccessor.Value;
18 references to _options
Microsoft.Extensions.Caching.Memory (18)
MemoryCache.cs (18)
57
if (
_options
.TrackStatistics)
65
TrackLinkedCacheEntries =
_options
.TrackLinkedCacheEntries; // we store the setting now so it's consistent for entire MemoryCache lifetime
68
private DateTime UtcNow =>
_options
.Clock?.UtcNow.UtcDateTime ?? DateTime.UtcNow;
121
if (
_options
.HasSizeLimit && entry.Size < 0)
123
throw new InvalidOperationException(SR.Format(SR.CacheEntryHasEmptySize, nameof(entry.Size), nameof(
_options
.SizeLimit)));
154
coherentState.RemoveEntry(priorEntry,
_options
);
185
if (
_options
.HasSizeLimit)
203
coherentState.RemoveEntry(priorEntry,
_options
);
252
coherentState.RemoveEntry(entry,
_options
);
281
if (
_options
.HasSizeLimit)
322
CurrentEstimatedSize =
_options
.SizeLimit.HasValue ? Size : null
332
_coherentState.RemoveEntry(entry,
_options
);
341
if (
_options
.ExpirationScanFrequency < utcNow - _lastExpirationScan)
431
coherentState.RemoveEntry(entry,
_options
);
446
long sizeLimit =
_options
.SizeLimitValue;
511
long sizeLimit =
_options
.SizeLimitValue;
514
long lowWatermark = sizeLimit - (long)(sizeLimit *
_options
.CompactionPercentage);
585
coherentState.RemoveEntry(entry,
_options
);