diff --git a/src/main.ts b/src/main.ts
index 8cd3e28..945e709 100644
--- a/src/main.ts
+++ b/src/main.ts
@@ -285,7 +285,7 @@ export default class LocatorPlugin extends Plugin {
// Disable settings.useCache while writing the cache, in case it freezes
const cacheEnabled = this.settings.useCache
- if (cacheEnabled && !this.settings.DANGER_forceSaveCache) {
+ if (cacheEnabled) {
this.settings.useCache = false
await saveSettings(this)
}
diff --git a/src/settings/index.ts b/src/settings/index.ts
index cb9e586..e8e1934 100644
--- a/src/settings/index.ts
+++ b/src/settings/index.ts
@@ -127,7 +127,6 @@ export function getDefaultSettings(app: App): LocatorSettings {
verboseLogging: false,
DANGER_httpHost: null,
- DANGER_forceSaveCache: false,
}
}
diff --git a/src/settings/settings-danger.ts b/src/settings/settings-danger.ts
index 7fb0a4f..f8a34d9 100644
--- a/src/settings/settings-danger.ts
+++ b/src/settings/settings-danger.ts
@@ -1,7 +1,7 @@
import { Setting } from 'obsidian'
import type LocatorPlugin from 'src/main'
import type { LocatorSettings } from './utils'
-import { htmlDescription, isCacheEnabled, needsARestart, saveSettings } from './utils'
+import { htmlDescription, isCacheEnabled, needsARestart } from './utils'
export function injectSettingsDanger(
plugin: LocatorPlugin,
@@ -12,21 +12,6 @@ export function injectSettingsDanger(
new Setting(containerEl).setName('Danger Zone').setHeading()
- // Force save cache
- new Setting(containerEl)
- .setName('Force save the cache')
- .setDesc(
- htmlDescription(`Locator has a security feature that automatically disables cache writing if it cannot fully perform the operation.
- Use this option to force the cache to be saved, even if it causes a crash.
- ⚠️ Enabling this setting could lead to crash loops`)
- )
- .addToggle(toggle =>
- toggle.setValue(settings.DANGER_forceSaveCache).onChange(async v => {
- settings.DANGER_forceSaveCache = v
- await saveSettings(plugin)
- })
- )
-
// Clear cache data
if (isCacheEnabled()) {
new Setting(containerEl)
diff --git a/src/settings/utils.ts b/src/settings/utils.ts
index d20f4d3..e36d79d 100644
--- a/src/settings/utils.ts
+++ b/src/settings/utils.ts
@@ -82,5 +82,4 @@ export interface LocatorSettings extends WeightingSettings {
httpApiNotice: boolean
DANGER_httpHost: string | null
- DANGER_forceSaveCache: boolean
}