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.

This commit is contained in:
Rich 2012-07-25 21:43:42 +00:00
parent 43203c4bdd
commit fab1e8935e

View File

@ -39,7 +39,15 @@ namespace VEPROMS.CSLA.Library
private static List<ItemInfo> _CacheList = new List<ItemInfo>();
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)
{