Skip to content

Commit a5fea26

Browse files
authored
HybridCacheService now sets WriteSynchronouslyWhenQueueFull = false
This better tolerates multi-instance situations where writes can't happen without outright failing requests.
1 parent d644008 commit a5fea26

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/Imageflow.Server.HybridCache/HybridCacheService.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public HybridCacheService(HybridCacheOptions options, ILogger<HybridCacheService
2222
AsyncCacheOptions = new AsyncCacheOptions()
2323
{
2424
MaxQueuedBytes = Math.Max(0,options.QueueSizeLimitInBytes),
25-
WriteSynchronouslyWhenQueueFull = true,
25+
WriteSynchronouslyWhenQueueFull = false,
2626
MoveFileOverwriteFunc = (from, to) => File.Move(from, to, true)
2727
},
2828
CleanupManagerOptions = new CleanupManagerOptions()
@@ -61,4 +61,4 @@ public Task<IStreamCacheResult> GetOrCreateBytes(byte[] key, AsyncBytesResult da
6161
return cache.GetOrCreateBytes(key, dataProviderCallback, cancellationToken, retrieveContentType);
6262
}
6363
}
64-
}
64+
}

0 commit comments

Comments
 (0)