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