speedup: call force() only at the end of the build, between chunk builds drop only...
[idea/community.git] / jps / model / src / org / jetbrains / ether / dependencyView / PersistentMultiMaplet.java
index 73d3d68048fe6b5b825501794938c03d6fbb37e8..b62eb72f2b76bed1bbd9f19a56ce8c10df839c84 100644 (file)
@@ -167,8 +167,13 @@ class PersistentMultiMaplet<K, V> implements MultiMaplet<K, V> {
     }
   }
 
-  public void flush() {
-    myMap.force();
+  public void flush(boolean memoryCachesOnly) {
+    if (memoryCachesOnly) {
+      myMap.dropMemoryCaches();
+    }
+    else {
+      myMap.force();
+    }
   }
 
   @Override