From 9563e4f85ea6bdd3410dae2a7d48ea0664fe606c Mon Sep 17 00:00:00 2001 From: gnattu Date: Sat, 1 Jun 2024 18:41:02 -0400 Subject: Backport pull request #11823 from jellyfin/release-10.9.z Add Env Var to disable second level cache Original-merge: 95c7d997c13cfcd4038174ba00525d5628475fb7 Merged-by: joshuaboniface Backported-by: Joshua M. Boniface --- .../Extensions/ConfigurationExtensions.cs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'MediaBrowser.Controller/Extensions/ConfigurationExtensions.cs') diff --git a/MediaBrowser.Controller/Extensions/ConfigurationExtensions.cs b/MediaBrowser.Controller/Extensions/ConfigurationExtensions.cs index 6c58064ce..7dfda73bf 100644 --- a/MediaBrowser.Controller/Extensions/ConfigurationExtensions.cs +++ b/MediaBrowser.Controller/Extensions/ConfigurationExtensions.cs @@ -64,6 +64,11 @@ namespace MediaBrowser.Controller.Extensions /// public const string SqliteCacheSizeKey = "sqlite:cacheSize"; + /// + /// Disable second level cache of sqlite. + /// + public const string SqliteDisableSecondLevelCacheKey = "sqlite:disableSecondLevelCache"; + /// /// Gets a value indicating whether the application should host static web content from the . /// @@ -128,5 +133,15 @@ namespace MediaBrowser.Controller.Extensions /// The sqlite cache size. public static int? GetSqliteCacheSize(this IConfiguration configuration) => configuration.GetValue(SqliteCacheSizeKey); + + /// + /// Gets whether second level cache disabled from the . + /// + /// The configuration to read the setting from. + /// Whether second level cache disabled. + public static bool GetSqliteSecondLevelCacheDisabled(this IConfiguration configuration) + { + return configuration.GetValue(SqliteDisableSecondLevelCacheKey); + } } } -- cgit v1.2.3