WikiFunctions.SiteInfo.LoadCategoryCollation C# (CSharp) Method

LoadCategoryCollation() private method

Loads the category collation information (value of wgCategoryCollation parameter) from https://noc.wikimedia.org/conf/InitialiseSettings.php.txt Stores result in object cache
private LoadCategoryCollation ( ) : void
return void
        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);
            }
        }