public void Cleanup() { foreach (var cachedDocument in this.cachedDocuments.Values) { if (cachedDocument.CreationDate + this.documentLifespan < DateTime.UtcNow) { cachedDocument.MarkForDeletion(); } } }