aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJP Dillingham <jp@dillingham.me>2022-09-17 17:16:33 -0500
committerJP Dillingham <jp@dillingham.me>2022-09-17 17:16:33 -0500
commitbd2d0f0e044376684ddd3176bca1b9101cbd793e (patch)
tree21c2be313d7e9a0eacabab67f3b8f5f60fad9239 /src
parentcaeaa1ed4f906ad9bd791611d184d93ba2e0e573 (diff)
downloadslskd-bd2d0f0e044376684ddd3176bca1b9101cbd793e.tar.gz
provide WorkerCount to SharedFileCache
Diffstat (limited to 'src')
-rw-r--r--src/slskd/Shares/ShareService.cs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/slskd/Shares/ShareService.cs b/src/slskd/Shares/ShareService.cs
index dd808360..96ac4c1c 100644
--- a/src/slskd/Shares/ShareService.cs
+++ b/src/slskd/Shares/ShareService.cs
@@ -41,7 +41,10 @@ namespace slskd.Shares
IOptionsMonitor<Options> optionsMonitor,
ISharedFileCache sharedFileCache = null)
{
- Cache = sharedFileCache ?? new SharedFileCache(storageMode: optionsMonitor.CurrentValue.Shares.Cache.StorageMode.ToEnum<StorageMode>());
+ Cache = sharedFileCache ?? new SharedFileCache(
+ storageMode: optionsMonitor.CurrentValue.Shares.Cache.StorageMode.ToEnum<StorageMode>(),
+ workerCount: optionsMonitor.CurrentValue.Shares.Cache.Workers);
+
Cache.StateMonitor.OnChange(cacheState =>
{
var (previous, current) = cacheState;