ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 22 - AD0-E722 discussion

Report
Export

An Architect needs to integrate an Adobe Commerce store with a new Shipping Carrier. Cart data is sent to the Shipping Carrier's API to retrieve the price and display to the customer. After the feature is implemented on the store, the API hits its quota and returns the error 'Too many requests'. The Shipping Carrier warns the store about sending too many requests with the same content to the API.

In the carrier model, what should the Architect change to fix the problem?

A.
ln_doShipmentRequest()f call canCollectRates() before sending request to the API.
Answers
A.
ln_doShipmentRequest()f call canCollectRates() before sending request to the API.
B.
Override getResponse, save the response to a variable, check if the response exists, then return.
Answers
B.
Override getResponse, save the response to a variable, check if the response exists, then return.
C.
Implement _setCachedQuotes() and _getCachedQuotes(), return the data if the request matches.
Answers
C.
Implement _setCachedQuotes() and _getCachedQuotes(), return the data if the request matches.
Suggested answer: C

Explanation:

The carrier model class can implement caching methods to store and retrieve the quotes from the API based on the request parameters. This can reduce the number of API calls and improve the performance of the shipping rate calculation. The _setCachedQuotes() method can save the response from the API to a cache storage, and the _getCachedQuotes() method can check if there is a cached response for the current request and return it if it exists.Reference:Caching in carrier model,Carrier model interface

asked 02/10/2024
John Ordonez
30 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first