1 write to _options
Microsoft.Extensions.Caching.Memory (1)
MemoryCache.cs (1)
65_options = optionsAccessor.Value;
21 references to _options
Microsoft.Extensions.Caching.Memory (21)
MemoryCache.cs (21)
70if (_options.TrackStatistics) 77Tags = [new("dotnet.cache.name", _options.Name)] 83TrackLinkedCacheEntries = _options.TrackLinkedCacheEntries; // we store the setting now so it's consistent for entire MemoryCache lifetime 86private DateTime UtcNow => _options.Clock?.UtcNow.UtcDateTime ?? DateTime.UtcNow; 131if (_options.HasSizeLimit && entry.Size < 0) 133throw new InvalidOperationException(SR.Format(SR.CacheEntryHasEmptySize, nameof(entry.Size), nameof(_options.SizeLimit))); 164coherentState.RemoveEntry(priorEntry, _options); 182if (_options.HasSizeLimit) 209if (_options.HasSizeLimit) 227coherentState.RemoveEntry(priorEntry, _options); 329if (coherentState.RemoveEntry(entry, _options) && _allStats is not null) 362if (_options.HasSizeLimit) 403CurrentEstimatedSize = _options.HasSizeLimit ? Size : null, 414if (_coherentState.RemoveEntry(entry, _options) && _allStats is not null) 427if (_options.ExpirationScanFrequency < utcNow - _lastExpirationScan) 527if (coherentState.RemoveEntry(entry, _options) && _allStats is not null) 545long sizeLimit = _options.SizeLimitValue; 614long sizeLimit = _options.SizeLimitValue; 617long lowWatermark = sizeLimit - (long)(sizeLimit * _options.CompactionPercentage); 688if (coherentState.RemoveEntry(entry, _options)) 904KeyValuePair<string, object?> cacheNameTag = new("dotnet.cache.name", _options.Name);