Exemplo n.º 1
0
        /// <summary>
        /// Cleans the expired items from the cache.
        /// </summary>
        /// <remarks>CFI, 2012-03-10</remarks>
        private void CleanExpired()
        {
            var expired = from l in lifetime.AsParallel()
                          where l.Value <= DateTimeOffset.Now
                          select l;

            expired.ForAll((e) => { values.Remove(e.Key); lifetime.Remove(e.Key); });
        }