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:
parent
43203c4bdd
commit
fab1e8935e
@ -39,7 +39,15 @@ namespace VEPROMS.CSLA.Library
|
|||||||
private static List<ItemInfo> _CacheList = new List<ItemInfo>();
|
private static List<ItemInfo> _CacheList = new List<ItemInfo>();
|
||||||
protected static void AddToCache(ItemInfo 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)
|
protected static void RemoveFromCache(ItemInfo itemInfo)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user