Fixed cache handling for DeepL action & API key
This commit is contained in:
1 file changed
+8
@@ -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>();
|
||||
|
||||
|
||||
Reference in new issue
Block a user