Fixed cache handling for DeepL action & API key
This commit is contained in:
parent
38416cb675
commit
c9bd1b5be9
@ -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>();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user