IJPL-148837 Gradle projects are reloaded on every project reopen if JetBrains IDE Services is installed

GitOrigin-RevId: 3012a71b6777879846c70ff66243ee46483d3e8b
This commit is contained in:
Vladimir Krivosheev
2024-05-17 09:44:43 +02:00
committed by intellij-monorepo-bot
parent fa9201ab6e
commit 89f1280e65

View File

@@ -22,6 +22,7 @@ internal val SETTINGS_CONTROLLER_EP_NAME: ExtensionPointName<DelegatedSettingsCo
class SettingsControllerMediator(
private val controllers: List<DelegatedSettingsController> = SETTINGS_CONTROLLER_EP_NAME.extensionList,
private val isPersistenceStateComponentProxy: Boolean = controllers.size > 1,
private val useEfficientStorageForCache: Boolean = true,
) : SettingsController {
@TestOnly
constructor(isPersistenceStateComponentProxy: Boolean)
@@ -64,9 +65,11 @@ class SettingsControllerMediator(
}
override fun createStateStorage(collapsedPath: String, file: Path): Any? {
return when (collapsedPath) {
StoragePathMacros.CACHE_FILE -> StateStorageBackedByController(controller = this, tags = java.util.List.of(CacheTag))
else -> null
if (useEfficientStorageForCache && collapsedPath == StoragePathMacros.CACHE_FILE) {
return StateStorageBackedByController(controller = this, tags = java.util.List.of(CacheTag))
}
else {
return null
}
}
@@ -90,7 +93,7 @@ class SettingsControllerMediator(
return null
}
else {
return SettingsControllerMediator(controllers = java.util.List.copyOf(result), isPersistenceStateComponentProxy = true)
return SettingsControllerMediator(controllers = java.util.List.copyOf(result), isPersistenceStateComponentProxy = true, useEfficientStorageForCache = false)
}
}
}