From fab1e8935ecbab3664888883baff18926f861db9 Mon Sep 17 00:00:00 2001 From: Rich Date: Wed, 25 Jul 2012 21:43:42 +0000 Subject: [PATCH] The check to see if the iteminfo was already in the cache was using a rediculous amount of time. I removed the check and added erro handling. --- PROMS/VEPROMS.CSLA.Library/Generated/ItemInfo.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/PROMS/VEPROMS.CSLA.Library/Generated/ItemInfo.cs b/PROMS/VEPROMS.CSLA.Library/Generated/ItemInfo.cs index b3d5688a..3e113a3d 100644 --- a/PROMS/VEPROMS.CSLA.Library/Generated/ItemInfo.cs +++ b/PROMS/VEPROMS.CSLA.Library/Generated/ItemInfo.cs @@ -39,7 +39,15 @@ namespace VEPROMS.CSLA.Library private static List _CacheList = new List(); protected static void AddToCache(ItemInfo itemInfo) { - if (!_CacheList.Contains(itemInfo)) _CacheList.Add(itemInfo); // In AddToCache + //if (!_CacheList.Contains(itemInfo)) + try + { + _CacheList.Add(itemInfo); // In AddToCache + } + catch (Exception ex) + { + _MyLog.ErrorFormat("ItemInfo {0}.{1} already exists in the cache", itemInfo.ItemID,itemInfo.MyItemInfoUnique); + } } protected static void RemoveFromCache(ItemInfo itemInfo) {