diff options
| author | gnattu <gnattu@users.noreply.github.com> | 2024-06-01 18:41:02 -0400 |
|---|---|---|
| committer | Joshua M. Boniface <joshua@boniface.me> | 2024-06-01 18:41:02 -0400 |
| commit | 9563e4f85ea6bdd3410dae2a7d48ea0664fe606c (patch) | |
| tree | 3dbab33ce1d78bd84bd21e19a78a057a8aef4571 /MediaBrowser.Controller/Extensions | |
| parent | c4b7c91f3a4f4219f88166f87d84f045231a6271 (diff) | |
Backport pull request #11823 from jellyfin/release-10.9.z
Add Env Var to disable second level cache
Original-merge: 95c7d997c13cfcd4038174ba00525d5628475fb7
Merged-by: joshuaboniface <joshua@boniface.me>
Backported-by: Joshua M. Boniface <joshua@boniface.me>
Diffstat (limited to 'MediaBrowser.Controller/Extensions')
| -rw-r--r-- | MediaBrowser.Controller/Extensions/ConfigurationExtensions.cs | 15 |
1 files changed, 15 insertions, 0 deletions
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 @@ -65,6 +65,11 @@ namespace MediaBrowser.Controller.Extensions 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> /// <param name="configuration">The configuration to retrieve the value from.</param> @@ -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); + } } } |
