internal static void ClearCustomListCache(string listName = null)
{
lock (syncLists)
{
// check if something to clear
if (_CustomListsAndItems == null) return;
// clear all lists
if (string.IsNullOrEmpty(listName))
{
_CustomListsAndItems = null;
return;
}
// clear selected list
var list = _CustomListsAndItems.FirstOrDefault(t => t.Key.Name == listName);
if (list.Key != null)
{
_CustomListsAndItems.Remove(list.Key);
}
}
}