public object Get(string key)
{
if (String.IsNullOrEmpty(key)) throw new ArgumentNullException(nameof(key));
lock (CacheLock)
{
List<Tuple<string, object, DateTime>> entries = new List<Tuple<string, object, DateTime>>();
if (Cache.Count > 0) entries = Cache.Where(x => x.Item1 == key).ToList();
else entries = null;
if (entries == null) return null;
else
{
if (entries.Count > 0)
{
foreach (Tuple<string, object, DateTime> curr in entries)
{
return curr.Item2;
}
}
return null;
}
}
}