From 402a5e2c9f7f46e6a33bc284cc606972af4edee0 Mon Sep 17 00:00:00 2001 From: gnattu Date: Sun, 26 May 2024 10:45:38 +0800 Subject: [PATCH] Use simpler config value Only true and false are supported now Signed-off-by: gnattu --- .../Extensions/ConfigurationExtensions.cs | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/MediaBrowser.Controller/Extensions/ConfigurationExtensions.cs b/MediaBrowser.Controller/Extensions/ConfigurationExtensions.cs index d6517e6264..7dfda73bf4 100644 --- a/MediaBrowser.Controller/Extensions/ConfigurationExtensions.cs +++ b/MediaBrowser.Controller/Extensions/ConfigurationExtensions.cs @@ -141,18 +141,7 @@ namespace MediaBrowser.Controller.Extensions /// Whether second level cache disabled. public static bool GetSqliteSecondLevelCacheDisabled(this IConfiguration configuration) { - var disableSecondLevelCacheConfig = configuration.GetValue(SqliteDisableSecondLevelCacheKey); - var disableSecondLevelCache = false; - if (disableSecondLevelCacheConfig is not null) - { - disableSecondLevelCache = disableSecondLevelCacheConfig.ToUpperInvariant() switch - { - "FALSE" or "NO" or "0" => false, - _ => true - }; - } - - return disableSecondLevelCache; + return configuration.GetValue(SqliteDisableSecondLevelCacheKey); } } }