From f06f3bc88bb1a56905f5124d573c2a851486cf40 Mon Sep 17 00:00:00 2001 From: eaddingtonwhite <5491827+eaddingtonwhite@users.noreply.github.com> Date: Mon, 1 Jul 2024 17:18:51 -0700 Subject: [PATCH] chore: reduce write buffered channel max size Reduce max buffered channel size so only have max of `100` items in buffer channel by default. --- caching/caching.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/caching/caching.go b/caching/caching.go index 1480d2a..403ddca 100644 --- a/caching/caching.go +++ b/caching/caching.go @@ -95,7 +95,7 @@ func NewCachingMiddleware(mw *cachingMiddleware) middleware.InitializeMiddleware } func (d *cachingMiddleware) startAsyncBatchWriter() { - const maxBufferSize = 10000 // TODO think about this number. Should we make configurable or larger/smaller? + const maxBufferSize = 100 // Should we make configurable or larger/smaller? batchWriteChan := make(chan *momento.SetBatchRequest, maxBufferSize) d.asyncWriteChan = batchWriteChan