README.md in routemaster-drain-3.6.1 vs README.md in routemaster-drain-3.6.2

- old
+ new

@@ -255,10 +255,17 @@ See [rubydoc](http://rubydoc.info/github/deliveroo/routemaster-drain/Routemaster/Cache) for more details on `Cache`. +If you need to provide configure the `APIClient` used by `Routemaster::Cache`, you can +configure it using `client_options`: + +```ruby +$cache = Routemaster::Cache.new(client_options: {source_peer: "<your user agent>"}) +``` + ### Expire Cache data for all notified resources You may wish to maintain a coherent cache, but don't need the cache to be warmed before you process incoming events. In that case, use the cache as detailed above but swap the `Caching` drain out for `CacheBusting` @@ -280,10 +287,13 @@ ```ruby require 'routemaster/fetcher' require 'routemaster/responses/hateoas_response' -client = Routemaster::APIClient.new(response_class: Routemaster::Responses::HateoasResponse) +client = Routemaster::APIClient.new( + response_class: Routemaster::Responses::HateoasResponse, + source_peer: "<your user agent>" +) response = client.discover('https://identity.deliveroo.com.dev') session_create_response = response.sessions.create(email: 'test@test.com', password: 'sup3rs3cr3t') session_create_response.user.show(1) ```