private void LoadCategoryCollation()
{
catCollationInfo = (string) ObjectCache.Global.Get<string>("CategoryCollation:");
// web lookup if not in cache
if (string.IsNullOrEmpty(catCollationInfo))
{
catCollationInfo = Tools.GetHTML(@"https://noc.wikimedia.org/conf/InitialiseSettings.php.txt");
// remove text before wgCategoryCollation section
catCollationInfo = catCollationInfo.Substring(catCollationInfo.IndexOf("wgCategoryCollation"));
// remove comments
catCollationInfo = Regex.Replace(catCollationInfo, @" *//.*", "");
// remove text after wgCategoryCollation section
catCollationInfo = catCollationInfo.Substring(0, catCollationInfo.IndexOf(")"));
// cache successful result
if (!string.IsNullOrEmpty(catCollationInfo))
ObjectCache.Global.Set("CategoryCollation:", catCollationInfo);
}
}