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
);
299
coherentState.RemoveEntry(entry,
_options
);
329
if (
_options
.HasSizeLimit)
370
CurrentEstimatedSize =
_options
.SizeLimit.HasValue ? Size : null
380
_coherentState.RemoveEntry(entry,
_options
);
389
if (
_options
.ExpirationScanFrequency < utcNow - _lastExpirationScan)
478
coherentState.RemoveEntry(entry,
_options
);
493
long sizeLimit =
_options
.SizeLimitValue;
558
long sizeLimit =
_options
.SizeLimitValue;
561
long lowWatermark = sizeLimit - (long)(sizeLimit *
_options
.CompactionPercentage);
631
coherentState.RemoveEntry(entry,
_options
);