diff --git a/I18N Commander/Processor/AppSettings.cs b/I18N Commander/Processor/AppSettings.cs index b99d94d..5d07220 100644 --- a/I18N Commander/Processor/AppSettings.cs +++ b/I18N Commander/Processor/AppSettings.cs @@ -115,6 +115,10 @@ public static class AppSettings public static async Task GetDeepLAPIKey() { + // Check the cache: + if (CACHE_DEEPL_API_KEY_IS_LOADED) + return CACHE_DEEPL_API_KEY; + // Get the database: await using var db = ProcessorMeta.ServiceProvider.GetRequiredService(); @@ -181,6 +185,10 @@ public static class AppSettings public static async Task GetDeepLAction() { + // Check the cache: + if (CACHE_DEEPL_ACTION_IS_LOADED) + return CACHE_DEEPL_ACTION; + // Get the database: await using var db = ProcessorMeta.ServiceProvider.GetRequiredService();