1 write to _options
Microsoft.Extensions.Caching.Memory (1)
MemoryCache.cs (1)
54
_options
= optionsAccessor.Value;
18 references to _options
Microsoft.Extensions.Caching.Memory (18)
MemoryCache.cs (18)
59
if (
_options
.TrackStatistics)
67
TrackLinkedCacheEntries =
_options
.TrackLinkedCacheEntries; // we store the setting now so it's consistent for entire MemoryCache lifetime
70
private DateTime UtcNow =>
_options
.Clock?.UtcNow.UtcDateTime ?? DateTime.UtcNow;
115
if (
_options
.HasSizeLimit && entry.Size < 0)
117
throw new InvalidOperationException(SR.Format(SR.CacheEntryHasEmptySize, nameof(entry.Size), nameof(
_options
.SizeLimit)));
148
coherentState.RemoveEntry(priorEntry,
_options
);
179
if (
_options
.HasSizeLimit)
197
coherentState.RemoveEntry(priorEntry,
_options
);
246
coherentState.RemoveEntry(entry,
_options
);
276
if (
_options
.HasSizeLimit)
317
CurrentEstimatedSize =
_options
.SizeLimit.HasValue ? Size : null
327
_coherentState.RemoveEntry(entry,
_options
);
336
if (
_options
.ExpirationScanFrequency < utcNow - _lastExpirationScan)
425
coherentState.RemoveEntry(entry,
_options
);
440
long sizeLimit =
_options
.SizeLimitValue;
505
long sizeLimit =
_options
.SizeLimitValue;
508
long lowWatermark = sizeLimit - (long)(sizeLimit *
_options
.CompactionPercentage);
578
coherentState.RemoveEntry(entry,
_options
);