Skip to content

Commit

Permalink
Use simpler config value
Browse files Browse the repository at this point in the history
Only true and false are supported now

Signed-off-by: gnattu <gnattuoc@me.com>
  • Loading branch information
gnattu committed May 26, 2024
1 parent b9c0fc6 commit 402a5e2
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions MediaBrowser.Controller/Extensions/ConfigurationExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -141,18 +141,7 @@ public static bool UseUnixSocket(this IConfiguration configuration)
/// <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);
}
}
}

0 comments on commit 402a5e2

Please sign in to comment.