Skip to content

Commit

Permalink
HybridCacheService now sets WriteSynchronouslyWhenQueueFull = false
Browse files Browse the repository at this point in the history
This better tolerates multi-instance situations where writes can't happen without outright failing requests.
  • Loading branch information
lilith authored Nov 28, 2023
1 parent d644008 commit a5fea26
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Imageflow.Server.HybridCache/HybridCacheService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public HybridCacheService(HybridCacheOptions options, ILogger<HybridCacheService
AsyncCacheOptions = new AsyncCacheOptions()
{
MaxQueuedBytes = Math.Max(0,options.QueueSizeLimitInBytes),
WriteSynchronouslyWhenQueueFull = true,
WriteSynchronouslyWhenQueueFull = false,
MoveFileOverwriteFunc = (from, to) => File.Move(from, to, true)
},
CleanupManagerOptions = new CleanupManagerOptions()
Expand Down Expand Up @@ -61,4 +61,4 @@ public Task<IStreamCacheResult> GetOrCreateBytes(byte[] key, AsyncBytesResult da
return cache.GetOrCreateBytes(key, dataProviderCallback, cancellationToken, retrieveContentType);
}
}
}
}

0 comments on commit a5fea26

Please sign in to comment.