소스 검색

Use simpler config value

Only true and false are supported now

Signed-off-by: gnattu <gnattuoc@me.com>
gnattu 1 년 전
부모
커밋
402a5e2c9f
1개의 변경된 파일1개의 추가작업 그리고 12개의 파일을 삭제
  1. 1 12
      MediaBrowser.Controller/Extensions/ConfigurationExtensions.cs

+ 1 - 12
MediaBrowser.Controller/Extensions/ConfigurationExtensions.cs

@@ -141,18 +141,7 @@ namespace MediaBrowser.Controller.Extensions
         /// <returns>Whether second level cache disabled.</returns>
         public static bool GetSqliteSecondLevelCacheDisabled(this IConfiguration configuration)
         {
-            var disableSecondLevelCacheConfig = configuration.GetValue<string?>(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<bool>(SqliteDisableSecondLevelCacheKey);
         }
     }
 }