Remove env var for second level cache
Signed-off-by: gnattu <gnattuoc@me.com>
This commit is contained in:
parent
d235378133
commit
26eab7aa2e
|
@ -19,8 +19,7 @@ namespace Emby.Server.Implementations
|
|||
{ FfmpegAnalyzeDurationKey, "200M" },
|
||||
{ PlaylistsAllowDuplicatesKey, bool.FalseString },
|
||||
{ BindToUnixSocketKey, bool.FalseString },
|
||||
{ SqliteCacheSizeKey, "20000" },
|
||||
{ SqliteDisableSecondLevelCacheKey, bool.FalseString }
|
||||
{ SqliteCacheSizeKey, "20000" }
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -40,18 +40,15 @@ namespace Jellyfin.Server
|
|||
{
|
||||
private readonly CoreAppHost _serverApplicationHost;
|
||||
private readonly IServerConfigurationManager _serverConfigurationManager;
|
||||
private readonly IConfiguration _startupConfig;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Startup" /> class.
|
||||
/// </summary>
|
||||
/// <param name="appHost">The server application host.</param>
|
||||
/// <param name="startupConfig">The server startupConfig.</param>
|
||||
public Startup(CoreAppHost appHost, IConfiguration startupConfig)
|
||||
public Startup(CoreAppHost appHost)
|
||||
{
|
||||
_serverApplicationHost = appHost;
|
||||
_serverConfigurationManager = appHost.ConfigurationManager;
|
||||
_startupConfig = startupConfig;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -70,7 +67,7 @@ namespace Jellyfin.Server
|
|||
// TODO remove once this is fixed upstream https://github.com/dotnet/aspnetcore/issues/34371
|
||||
services.AddSingleton<IActionResultExecutor<PhysicalFileResult>, SymlinkFollowingPhysicalFileResultExecutor>();
|
||||
services.AddJellyfinApi(_serverApplicationHost.GetApiPluginAssemblies(), _serverConfigurationManager.GetNetworkConfiguration());
|
||||
services.AddJellyfinDbContext(_startupConfig.GetSqliteSecondLevelCacheDisabled());
|
||||
services.AddJellyfinDbContext();
|
||||
services.AddJellyfinApiSwagger();
|
||||
|
||||
// configure custom legacy authentication
|
||||
|
|
|
@ -64,11 +64,6 @@ 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>
|
||||
|
@ -133,15 +128,5 @@ 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user