23 references to s_cacheList
System.Text.RegularExpressions (23)
System\Text\RegularExpressions\Regex.Cache.cs (23)
87s_cacheList.Clear(); 90else if (value < s_cacheList.Count) 97s_lastAccessed = s_cacheList[0]; 98for (int i = value; i < s_cacheList.Count; i++) 100s_cacheDictionary.TryRemove(s_cacheList[i].Key, out _); 102s_cacheList.RemoveRange(value, s_cacheList.Count - value); 104Debug.Assert(s_cacheList.Count == value); 199Debug.Assert(s_cacheList.Count == s_cacheDictionary.Count); 212if (s_cacheList.Count == s_maxCacheSize) 221itemsToExamine = s_cacheList.Count; 236int minListIndex = useRandom ? s_random.Next(s_cacheList.Count) : 0; 237long min = Volatile.Read(ref s_cacheList[minListIndex].LastAccessStamp); 242int nextIndex = useRandom ? s_random.Next(s_cacheList.Count) : i; 243long next = Volatile.Read(ref s_cacheList[nextIndex].LastAccessStamp); 254s_cacheDictionary.TryRemove(s_cacheList[minListIndex].Key, out _); 255s_cacheList[minListIndex] = s_cacheList[^1]; 256s_cacheList.RemoveAt(s_cacheList.Count - 1); 268s_cacheList.Add(node); 271Debug.Assert(s_cacheList.Count <= s_maxCacheSize); 272Debug.Assert(s_cacheList.Count == s_cacheDictionary.Count);