Skip to content

Commit

Permalink
Add documentation regarding per-thread client cache change.
Browse files Browse the repository at this point in the history
  • Loading branch information
ioquatix committed Aug 18, 2024
1 parent f440c61 commit f670357
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,24 @@ Faraday.new do |builder|
end
end
```

# v0.17.0

## Per-thread Client Cache

The default adapter now uses a per-thread client cache internally, to improve compatibility with existing code that shares a single `Faraday::Connection` instance across multiple threads.

```ruby
adapter = Faraday.new do |builder|
builder.adapter :async_http
end

3.times do
Thread.new do
Async do
# Each thread has it's own client cache.
adapter.get('http://example.com')
end
end
end
```

0 comments on commit f670357

Please sign in to comment.