Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ MaxCacheSize

int System.Text.RegularExpressions.RegexCache.MaxCacheSize
staticgetset

Definition at line 80 of file RegexCache.cs.

81 {
82 get
83 {
84 return s_maxCacheSize;
85 }
86 set
87 {
89 {
91 if (value == 0)
92 {
93 s_cacheDictionary.Clear();
94 s_cacheList.Clear();
95 s_lastAccessed = null;
96 }
97 else if (value < s_cacheList.Count)
98 {
99 s_cacheList.Sort((Node n1, Node n2) => Volatile.Read(ref n2.LastAccessStamp).CompareTo(Volatile.Read(ref n1.LastAccessStamp)));
101 for (int i = value; i < s_cacheList.Count; i++)
102 {
103 s_cacheDictionary.TryRemove(s_cacheList[i].Key, out var _);
104 }
105 s_cacheList.RemoveRange(value, s_cacheList.Count - value);
106 }
107 }
108 }
109 }
static readonly List< Node > s_cacheList
Definition RegexCache.cs:72
static readonly ConcurrentDictionary< Key, Node > s_cacheDictionary
Definition RegexCache.cs:70
static bool Read(ref bool location)
Definition Volatile.cs:67