善于使用HashSet和Dictionary使系统性能绝大的提升。
废话不说。直接上代码。
private static HashSet<string> hashSetLocationIds = new HashSet<string>();
string id = string.Format("{0}{1}{2}{3}{4}", 1,2,3,4).md5();
if (hashSetLocationIds.Contains(id)) return;
if (hashSetLocationIds.Count > 1x) hashSetLocationIds.Clear();
hashSetLocationIds.Add(id);
//you business code
2CPU+2G内存的低端入门级服务器配置。


end
 
                    
                
 
                
            
         浙公网安备 33010602011771号
浙公网安备 33010602011771号