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