Fixed cache handling for DeepL action & API key

This commit is contained in:
tsommer committed 2022-07-30 23:38:01 +02:00
1 parent 38416cb675
commit c9bd1b5be9
1 file changed
+8
+8
View File
@@ -115,6 +115,10 @@ public static class AppSettings
public static async Task<string> 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<DataContext>();
@@ -181,6 +185,10 @@ public static class AppSettings
public static async Task<SettingDeepLAction> GetDeepLAction()
{
// Check the cache:
if (CACHE_DEEPL_ACTION_IS_LOADED)
return CACHE_DEEPL_ACTION;
// Get the database:
await using var db = ProcessorMeta.ServiceProvider.GetRequiredService<DataContext>();