1 instantiation of CacheEntry
Microsoft.Extensions.Caching.Memory (1)
44 references to CacheEntry
Microsoft.Extensions.Caching.Memory (44)
MemoryCache.cs (29)
87foreach (KeyValuePair<object, CacheEntry> pairs in _coherentState._entries)
113internal void SetEntry(CacheEntry entry)
144if (coherentState._entries.TryGetValue(entry.Key, out CacheEntry? priorEntry))
220if (coherentState._entries.TryGetValue(key, out CacheEntry? tmp))
222CacheEntry entry = tmp;
279if (coherentState._entries.TryRemove(key, out CacheEntry? entry))
301foreach (KeyValuePair<object, CacheEntry> entry in oldState._entries)
329internal void EntryExpired(CacheEntry entry)
425foreach (KeyValuePair<object, CacheEntry> item in coherentState._entries)
427CacheEntry entry = item.Value;
444private bool UpdateCacheSizeExceedsCapacity(CacheEntry entry, CacheEntry? priorEntry, CoherentState coherentState)
539private void Compact(long removalSizeTarget, Func<CacheEntry, long> computeEntrySize, CoherentState coherentState)
541var entriesToRemove = new List<CacheEntry>();
543var lowPriEntries = new List<(CacheEntry entry, DateTimeOffset lastAccessed)>();
544var normalPriEntries = new List<(CacheEntry entry, DateTimeOffset lastAccessed)>();
545var highPriEntries = new List<(CacheEntry entry, DateTimeOffset lastAccessed)>();
550foreach (KeyValuePair<object, CacheEntry> item in coherentState._entries)
552CacheEntry entry = item.Value;
583foreach (CacheEntry entry in entriesToRemove)
593static void ExpirePriorityBucket(ref long removedSize, long removalSizeTarget, Func<CacheEntry, long> computeEntrySize, List<CacheEntry> entriesToRemove, List<(CacheEntry Entry, DateTimeOffset LastAccessed)> priorityEntries)
607foreach ((CacheEntry entry, _) in priorityEntries)
679internal ConcurrentDictionary<object, CacheEntry> _entries = new ConcurrentDictionary<object, CacheEntry>();
682private ICollection<KeyValuePair<object, CacheEntry>> EntriesCollection => _entries;
688internal void RemoveEntry(CacheEntry entry, MemoryCacheOptions options)
690if (EntriesCollection.Remove(new KeyValuePair<object, CacheEntry>(entry.Key, entry)))