aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/Extensions/ConfigurationExtensions.cs
diff options
context:
space:
mode:
authorShadowghost <Ghost_of_Stone@web.de>2023-06-07 08:25:32 +0200
committerShadowghost <Ghost_of_Stone@web.de>2023-06-07 08:25:32 +0200
commit006b04dc0b2fcbdcad50cbaf213cb1e7e47ea52a (patch)
tree79ab7200fe2a9df9d0a3efb42755f6eb22fad08f /MediaBrowser.Controller/Extensions/ConfigurationExtensions.cs
parenta381cd3c7652e4c802e697e367370f4dba3987f6 (diff)
parent60881eaa5981ffced3615fbff079871ed24c70e4 (diff)
Merge branch 'master' into network-rewrite
Diffstat (limited to 'MediaBrowser.Controller/Extensions/ConfigurationExtensions.cs')
-rw-r--r--MediaBrowser.Controller/Extensions/ConfigurationExtensions.cs13
1 files changed, 13 insertions, 0 deletions
diff --git a/MediaBrowser.Controller/Extensions/ConfigurationExtensions.cs b/MediaBrowser.Controller/Extensions/ConfigurationExtensions.cs
index 3b5e8ece7..6c58064ce 100644
--- a/MediaBrowser.Controller/Extensions/ConfigurationExtensions.cs
+++ b/MediaBrowser.Controller/Extensions/ConfigurationExtensions.cs
@@ -60,6 +60,11 @@ namespace MediaBrowser.Controller.Extensions
public const string UnixSocketPermissionsKey = "kestrel:socketPermissions";
/// <summary>
+ /// The cache size of the SQL database, see cache_size.
+ /// </summary>
+ public const string SqliteCacheSizeKey = "sqlite:cacheSize";
+
+ /// <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>
@@ -115,5 +120,13 @@ namespace MediaBrowser.Controller.Extensions
/// <returns>The unix socket permissions.</returns>
public static string? GetUnixSocketPermissions(this IConfiguration configuration)
=> configuration[UnixSocketPermissionsKey];
+
+ /// <summary>
+ /// Gets the cache_size from the <see cref="IConfiguration" />.
+ /// </summary>
+ /// <param name="configuration">The configuration to read the setting from.</param>
+ /// <returns>The sqlite cache size.</returns>
+ public static int? GetSqliteCacheSize(this IConfiguration configuration)
+ => configuration.GetValue<int?>(SqliteCacheSizeKey);
}
}