Skip to content

Commit

Permalink
chore: reduce write buffered channel max size
Browse files Browse the repository at this point in the history
Reduce max buffered channel size so only have max of `100` items in buffer channel by default.
  • Loading branch information
eaddingtonwhite authored Jul 2, 2024
1 parent e55a0e0 commit f06f3bc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion caching/caching.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f06f3bc

Please sign in to comment.