mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
Use simpler config value
Only true and false are supported now Signed-off-by: gnattu <gnattuoc@me.com>
This commit is contained in:
parent
b9c0fc69e8
commit
402a5e2c9f
@ -141,18 +141,7 @@ namespace MediaBrowser.Controller.Extensions
|
|||||||
/// <returns>Whether second level cache disabled.</returns>
|
/// <returns>Whether second level cache disabled.</returns>
|
||||||
public static bool GetSqliteSecondLevelCacheDisabled(this IConfiguration configuration)
|
public static bool GetSqliteSecondLevelCacheDisabled(this IConfiguration configuration)
|
||||||
{
|
{
|
||||||
var disableSecondLevelCacheConfig = configuration.GetValue<string?>(SqliteDisableSecondLevelCacheKey);
|
return configuration.GetValue<bool>(SqliteDisableSecondLevelCacheKey);
|
||||||
var disableSecondLevelCache = false;
|
|
||||||
if (disableSecondLevelCacheConfig is not null)
|
|
||||||
{
|
|
||||||
disableSecondLevelCache = disableSecondLevelCacheConfig.ToUpperInvariant() switch
|
|
||||||
{
|
|
||||||
"FALSE" or "NO" or "0" => false,
|
|
||||||
_ => true
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
return disableSecondLevelCache;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user