diff options
| author | Ronan Charles-Lorel <roro.roronoa@gmail.com> | 2023-06-29 15:08:52 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-06-29 15:08:52 +0200 |
| commit | e108183b138552013bbfd13c36937481228eb9e6 (patch) | |
| tree | 8e374adf35d64b157ac88e5b84a25d186bd4ccf1 /MediaBrowser.Controller/Extensions/ConfigurationExtensions.cs | |
| parent | 31ac861b8560547c7e0c46513077abf76e6bc618 (diff) | |
| parent | b5bbb98175e0542d43c01f80c15e8dce04e58b53 (diff) | |
Merge branch 'jellyfin:master' into master
Diffstat (limited to 'MediaBrowser.Controller/Extensions/ConfigurationExtensions.cs')
| -rw-r--r-- | MediaBrowser.Controller/Extensions/ConfigurationExtensions.cs | 13 |
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); } } |
