Say you consume a Restful API to hidrate order data in another system. Do you fetch orders as:
/orders?ids=id-1,id-2,id-3
or separate calls to /orders/id-x
which can be cached and retrieved by id as a memoized function?Well if you had to pick only one the second is probably better, but the best would be abstracting away order fetching in application code to always fetch single orders and behind the scenes looking up the cache for singles and pooling all the misses into a single request to the plural endpoint.