diff options
author | Marius Ungureanu <marius.ungureanu@xamarin.com> | 2019-06-06 14:12:47 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-06 14:12:47 +0300 |
commit | fc1198ac16e20589cb09792b5436cc65d417191a (patch) | |
tree | 35f5950cbaef2fa59d9694c6ef7f2954f9dc31fc /main | |
parent | 2cf3653e4fcfe2ad29f1be5ce1dc517c2b85a9d2 (diff) |
[Workspace] Swap the order of cache clearing in the manager. (#7810)
By doing so, we ensure that any in-flight operation to update an assembly from disk must happen before we clear the caches.
Diffstat (limited to 'main')
-rw-r--r-- | main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.TypeSystem/MonoDevelopMetadataReferenceManager.cs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.TypeSystem/MonoDevelopMetadataReferenceManager.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.TypeSystem/MonoDevelopMetadataReferenceManager.cs index 60b644660c..4a9b92eaa0 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.TypeSystem/MonoDevelopMetadataReferenceManager.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.TypeSystem/MonoDevelopMetadataReferenceManager.cs @@ -217,8 +217,11 @@ namespace MonoDevelop.Ide.TypeSystem public void ClearCache () { - _metadataCache.ClearCache(); + // Clear the reference cache before the metadata cache + // as the FileWatcher updates can technically trigger while the metadata cache + // is being cleared, avoiding unnecessary work and possible items not being invalidated. _metadataReferenceCache.ClearCache (); + _metadataCache.ClearCache(); } |