ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 24 - Certified MuleSoft Developer II discussion

Report
Export

A developer deploys an API to CloudHub and applies an OAuth policy on API Manager. During testing, the API response is slow, so the developer reconfigures the API so that the out-of-the-box HTTP Caching policy is applied first, and the OAuth API policy is applied second.

What will happen when an HTTP request is received?

A.
In case of a cache hit, both the OAuth and HTTP Caching policies are evaluated; then the cached response is returned to the caller
Answers
A.
In case of a cache hit, both the OAuth and HTTP Caching policies are evaluated; then the cached response is returned to the caller
B.
In case of a cache it, only the HTTP Caching policy is evaluating; then the cached response is returned to the caller
Answers
B.
In case of a cache it, only the HTTP Caching policy is evaluating; then the cached response is returned to the caller
C.
In case of a cache miss, only the HTTP Caching policy is evaluated; then the API retrieves the data from the API implementation, and the policy stores the data to be cached in Object Store
Answers
C.
In case of a cache miss, only the HTTP Caching policy is evaluated; then the API retrieves the data from the API implementation, and the policy stores the data to be cached in Object Store
D.
In case of a cache miss, both the OAuth and HTTP Caching policies are evaluated; then the API retrieves the data from the API implementation, and the policy does not store the data in Object Store
Answers
D.
In case of a cache miss, both the OAuth and HTTP Caching policies are evaluated; then the API retrieves the data from the API implementation, and the policy does not store the data in Object Store
Suggested answer: B

Explanation:

When an HTTP request is received and the HTTP Caching policy is applied first, it checks if there is a cached response for that request in Object Store. If there is a cache hit, meaning that a valid cached response exists, then only the HTTP Caching policy is evaluated and the cached response is returned to the caller without invoking the OAuth policy or the API implementation. If there is a cache miss, meaning that no valid cached response exists, then both the HTTP Caching policy and the OAuth policy are evaluated before invoking the API implementation.

Reference: https://docs.mulesoft.com/api-manager/2.x/http-caching-policy#policy-ordering

asked 23/09/2024
Jendoubi moez
36 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first