internal void CheckDependencies ()
{
try {
cacheLock.EnterWriteLock ();
List <CacheItem> list = cache.SelectItems (it => {
if (it == null)
return false;
if (it.Dependency != null && it.Dependency.HasChanged && !NeedsUpdate (it, CacheItemUpdateReason.DependencyChanged, false))
return true;
return false;
});
foreach (CacheItem it in list)
Remove (it.Key, CacheItemRemovedReason.DependencyChanged, false, true);
list.Clear ();
list.TrimExcess ();
} finally {
// See comment at the top of the file, above cacheLock declaration
cacheLock.ExitWriteLock ();
}
}