Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorMarius Ungureanu <marius.ungureanu@xamarin.com>2019-06-06 14:12:47 +0300
committerGitHub <noreply@github.com>2019-06-06 14:12:47 +0300
commitfc1198ac16e20589cb09792b5436cc65d417191a (patch)
tree35f5950cbaef2fa59d9694c6ef7f2954f9dc31fc /main
parent2cf3653e4fcfe2ad29f1be5ce1dc517c2b85a9d2 (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.cs5
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();
}