23 references to s_cacheList
System.Text.RegularExpressions (23)
System\Text\RegularExpressions\Regex.Cache.cs (23)
107s_cacheList.Clear(); 110else if (value < s_cacheList.Count) 117s_lastAccessed = s_cacheList[0]; 118for (int i = value; i < s_cacheList.Count; i++) 120s_cacheDictionary.TryRemove(s_cacheList[i].Key, out _); 122s_cacheList.RemoveRange(value, s_cacheList.Count - value); 124Debug.Assert(s_cacheList.Count == value); 219Debug.Assert(s_cacheList.Count == s_cacheDictionary.Count); 232if (s_cacheList.Count == s_maxCacheSize) 241itemsToExamine = s_cacheList.Count; 256int minListIndex = useRandom ? s_random.Next(s_cacheList.Count) : 0; 257long min = Volatile.Read(ref s_cacheList[minListIndex].LastAccessStamp); 262int nextIndex = useRandom ? s_random.Next(s_cacheList.Count) : i; 263long next = Volatile.Read(ref s_cacheList[nextIndex].LastAccessStamp); 274s_cacheDictionary.TryRemove(s_cacheList[minListIndex].Key, out _); 275s_cacheList[minListIndex] = s_cacheList[^1]; 276s_cacheList.RemoveAt(s_cacheList.Count - 1); 288s_cacheList.Add(node); 291Debug.Assert(s_cacheList.Count <= s_maxCacheSize); 292Debug.Assert(s_cacheList.Count == s_cacheDictionary.Count);