diff --git a/Emby.Server.Implementations/ConfigurationOptions.cs b/Emby.Server.Implementations/ConfigurationOptions.cs index c06cd8510..f0c267627 100644 --- a/Emby.Server.Implementations/ConfigurationOptions.cs +++ b/Emby.Server.Implementations/ConfigurationOptions.cs @@ -19,8 +19,7 @@ namespace Emby.Server.Implementations { FfmpegAnalyzeDurationKey, "200M" }, { PlaylistsAllowDuplicatesKey, bool.FalseString }, { BindToUnixSocketKey, bool.FalseString }, - { SqliteCacheSizeKey, "20000" }, - { SqliteDisableSecondLevelCacheKey, bool.FalseString } + { SqliteCacheSizeKey, "20000" } }; } } diff --git a/Jellyfin.Server/Extensions/WebHostBuilderExtensions.cs b/Jellyfin.Server/Extensions/WebHostBuilderExtensions.cs index 858df6728..6b95770ed 100644 --- a/Jellyfin.Server/Extensions/WebHostBuilderExtensions.cs +++ b/Jellyfin.Server/Extensions/WebHostBuilderExtensions.cs @@ -85,6 +85,6 @@ public static class WebHostBuilderExtensions logger.LogInformation("Kestrel listening to unix socket {SocketPath}", socketPath); } }) - .UseStartup(_ => new Startup(appHost, startupConfig)); + .UseStartup(_ => new Startup(appHost)); } } diff --git a/Jellyfin.Server/Startup.cs b/Jellyfin.Server/Startup.cs index 2ff377403..e9fb3e4c2 100644 --- a/Jellyfin.Server/Startup.cs +++ b/Jellyfin.Server/Startup.cs @@ -40,18 +40,15 @@ namespace Jellyfin.Server { private readonly CoreAppHost _serverApplicationHost; private readonly IServerConfigurationManager _serverConfigurationManager; - private readonly IConfiguration _startupConfig; /// /// Initializes a new instance of the class. /// /// The server application host. - /// The server startupConfig. - public Startup(CoreAppHost appHost, IConfiguration startupConfig) + public Startup(CoreAppHost appHost) { _serverApplicationHost = appHost; _serverConfigurationManager = appHost.ConfigurationManager; - _startupConfig = startupConfig; } /// @@ -70,7 +67,7 @@ namespace Jellyfin.Server // TODO remove once this is fixed upstream https://github.com/dotnet/aspnetcore/issues/34371 services.AddSingleton, SymlinkFollowingPhysicalFileResultExecutor>(); services.AddJellyfinApi(_serverApplicationHost.GetApiPluginAssemblies(), _serverConfigurationManager.GetNetworkConfiguration()); - services.AddJellyfinDbContext(_startupConfig.GetSqliteSecondLevelCacheDisabled()); + services.AddJellyfinDbContext(); services.AddJellyfinApiSwagger(); // configure custom legacy authentication diff --git a/MediaBrowser.Controller/Extensions/ConfigurationExtensions.cs b/MediaBrowser.Controller/Extensions/ConfigurationExtensions.cs index 7dfda73bf..6c58064ce 100644 --- a/MediaBrowser.Controller/Extensions/ConfigurationExtensions.cs +++ b/MediaBrowser.Controller/Extensions/ConfigurationExtensions.cs @@ -64,11 +64,6 @@ 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 . /// @@ -133,15 +128,5 @@ 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); - } } }