mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-18 15:03:06 +03:00
Backport pull request #11823 from jellyfin/release-10.9.z
Add Env Var to disable second level cache
Original-merge: 95c7d997c1
Merged-by: joshuaboniface <joshua@boniface.me>
Backported-by: Joshua M. Boniface <joshua@boniface.me>
This commit is contained in:
committed by
Joshua M. Boniface
parent
c4b7c91f3a
commit
9563e4f85e
@@ -64,6 +64,11 @@ namespace MediaBrowser.Controller.Extensions
|
||||
/// </summary>
|
||||
public const string SqliteCacheSizeKey = "sqlite:cacheSize";
|
||||
|
||||
/// <summary>
|
||||
/// Disable second level cache of sqlite.
|
||||
/// </summary>
|
||||
public const string SqliteDisableSecondLevelCacheKey = "sqlite:disableSecondLevelCache";
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether the application should host static web content from the <see cref="IConfiguration"/>.
|
||||
/// </summary>
|
||||
@@ -128,5 +133,15 @@ namespace MediaBrowser.Controller.Extensions
|
||||
/// <returns>The sqlite cache size.</returns>
|
||||
public static int? GetSqliteCacheSize(this IConfiguration configuration)
|
||||
=> configuration.GetValue<int?>(SqliteCacheSizeKey);
|
||||
|
||||
/// <summary>
|
||||
/// Gets whether second level cache disabled from the <see cref="IConfiguration" />.
|
||||
/// </summary>
|
||||
/// <param name="configuration">The configuration to read the setting from.</param>
|
||||
/// <returns>Whether second level cache disabled.</returns>
|
||||
public static bool GetSqliteSecondLevelCacheDisabled(this IConfiguration configuration)
|
||||
{
|
||||
return configuration.GetValue<bool>(SqliteDisableSecondLevelCacheKey);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user