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