This is not an API change. It's a change in recommendation on how to use the Flood service (\Drupal\Core\Flood\FloodInterface).
Until #2453341: Contact forms don't have necessary cache contexts & tags; flood control should work on validate, not on view, flood control was being used for the Contact module's pages, to ensure that users cannot send more than 5 messages per hour. The problem was the point at which flood control checking was happening: it was happening upon viewing the contact form. When that behavior is combined with caching of anonymous pages (through Drupal's internal page cache or an external reverse proxy), then the flood control checking is not actually happening at all anymore!
So, we fixed that.
- Site builders
- Flood control for the contact forms now happens upon submitting the contact forms, rather than upon viewing.
- Developers
- Always perform flood control upon submit, not upon viewing, to remain compatible with anonymous page caching. If you have a very good reason to do it upon viewing, then you must mark the route as uncacheable — see https://www.drupal.org/node/2463533
- Contrib modules extending/altering Contact
- Please update your code to run either before or after flood control. In general, test in combination with flood control.