public TValue this[THash key] { get { RemoveHashExpirados(key); lock (this) { if (ContainsKey(key)) { return(_dictionary[key].Valor); } } return(default(TValue)); } set { Remove(key); lock (this) _dictionary[key] = new ValueCacheControl(_cachedLimit, value); } }
private bool Desatualizado(ValueCacheControl valor) { return((_elapsedTime.Elapsed - valor.Criado) > _cachedLimit); }