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