The service image recommendation provider can take enough time to fetch data that it impacts the user experience. And it will take longer once metadata fetching is also included in the request (T290782).
Fetching from WANObject cache is much faster and removes a significant chunk of overhead from the response time. See for example this request
https://w.wiki/4LJb and how the HTTP request takes 430ms, 31% of the wall time)
The proposal is to swap in a cache-backed recommendation provider for the existing HTTP provider; check the cache, and if nothing's found, call the uncached
service image recommendation provider
To populate the cache, when we fetch TaskSet objects (on Special:Homepage), we can kick off deferred updates to fetch and cache image recommendation data for any image recommendation task types in the TaskSet.
When the user clicks through to a task, we should be able to load data from the cache instead of via HTTP
request to the service.