Skip to content

Commit f670357

Browse files
committed
Add documentation regarding per-thread client cache change.
1 parent f440c61 commit f670357

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

changes.md

+21
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,24 @@ Faraday.new do |builder|
1515
end
1616
end
1717
```
18+
19+
# v0.17.0
20+
21+
## Per-thread Client Cache
22+
23+
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.
24+
25+
```ruby
26+
adapter = Faraday.new do |builder|
27+
builder.adapter :async_http
28+
end
29+
30+
3.times do
31+
Thread.new do
32+
Async do
33+
# Each thread has it's own client cache.
34+
adapter.get('http://example.com')
35+
end
36+
end
37+
end
38+
```

0 commit comments

Comments
 (0)