Terraria
v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
◆
MaxCacheSize
int System.Text.RegularExpressions.RegexCache.MaxCacheSize
static
get
set
Definition at line
80
of file
RegexCache.cs
.
81
{
82
get
83
{
84
return
s_maxCacheSize
;
85
}
86
set
87
{
88
lock
(
SyncObj
)
89
{
90
s_maxCacheSize
=
value
;
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)));
100
s_lastAccessed
=
s_cacheList
[0];
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
}
System.Collections.Generic.Dictionary
Definition
Dictionary.cs:14
System.Text.RegularExpressions.RegexCache.SyncObj
static object SyncObj
Definition
RegexCache.cs:78
System.Text.RegularExpressions.RegexCache.s_cacheList
static readonly List< Node > s_cacheList
Definition
RegexCache.cs:72
System.Text.RegularExpressions.RegexCache.s_cacheDictionary
static readonly ConcurrentDictionary< Key, Node > s_cacheDictionary
Definition
RegexCache.cs:70
System.Text.RegularExpressions.RegexCache.s_lastAccessed
static volatile Node s_lastAccessed
Definition
RegexCache.cs:68
System.Text.RegularExpressions.RegexCache.s_maxCacheSize
static int s_maxCacheSize
Definition
RegexCache.cs:76
System.Threading.Volatile.Read
static bool Read(ref bool location)
Definition
Volatile.cs:67
System.Threading.Volatile
Definition
Volatile.cs:9
System.Text.RegularExpressions.ExceptionArgument.value
@ value
System.Text.RegularExpressions.ExceptionArgument.i
@ i
System
Text
RegularExpressions
RegexCache
Generated by
1.10.0