/// <summary> /// Ìí¼ÓInt32»º´æ¡£ /// </summary> /// <param name="sql">SQLÓï¾ä</param> /// <param name="n">´ý»º´æÕûÊý</param> /// <param name="tableNames">±íÃûÊý×é</param> public static void Add(String sql, Int32 n, String[] tableNames) { //¹Ø±Õ»º´æ if (CacheType == XCacheType.Close) { return; } //ÇëÇ󼶻º´æ if (CacheType == XCacheType.RequestCache) { if (HttpContext.Current == null) { return; } HttpContext.Current.Items.Add("XCache_Int32_" + sql, new CacheItem <Int32>(tableNames, n)); return; } //¾²Ì¬»º´æ if (_IntCache.ContainsKey(sql)) { return; } lock (_IntCache) { if (_IntCache.ContainsKey(sql)) { return; } _IntCache.Add(sql, new CacheItem <Int32>(tableNames, n)); } //´øÓÐЧÆÚ if (CacheType == XCacheType.Period) { CreateTimer(); } }