From 89f1280e65ef0ad06c73cd3dfb483c391aed580f Mon Sep 17 00:00:00 2001 From: Vladimir Krivosheev Date: Fri, 17 May 2024 09:44:43 +0200 Subject: [PATCH] IJPL-148837 Gradle projects are reloaded on every project reopen if JetBrains IDE Services is installed GitOrigin-RevId: 3012a71b6777879846c70ff66243ee46483d3e8b --- .../settings/local/SettingsControllerMediator.kt | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/platform/settings-local/src/com/intellij/platform/settings/local/SettingsControllerMediator.kt b/platform/settings-local/src/com/intellij/platform/settings/local/SettingsControllerMediator.kt index bc164a96efc1..8989b9c90d06 100644 --- a/platform/settings-local/src/com/intellij/platform/settings/local/SettingsControllerMediator.kt +++ b/platform/settings-local/src/com/intellij/platform/settings/local/SettingsControllerMediator.kt @@ -22,6 +22,7 @@ internal val SETTINGS_CONTROLLER_EP_NAME: ExtensionPointName = 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) } } } \ No newline at end of file