Professional Cloud Network Engineer Practice Questions

Google Cloud Professional Cloud Network Engineer exam preparation

Professional Cloud Network Engineer practice questions in English: 180 questions with explanations. The mock exam has 60 questions and 120 minutes.

Professional Cloud Network Engineer free question 6 / 10 · Domain 3: Configuring managed network services

You enable negative caching in Cloud CDN and set a custom policy that gives 404 responses a TTL. What happens to the default TTLs of other error status codes that the policy does not list?

  1. They get the same TTL as the successful responses
  2. They are not cached, so each code to cache has to be listed
  3. They get the same TTL as the 404 responses
  4. They keep their default TTLs while the 404 TTL is overridden
Show the answer and explanation

Answer: B

Why this is correct
The API section of the negative caching page says that when you specify a negative caching policy, you must specify a cache TTL for all response codes that you want to cache, and that Cloud CDN "doesn't apply any default negative caching when a policy exists." Without a policy, negative caching uses the default TTLs from the status code table, but once you add a policy with a TTL for 404, the codes you leave out of it are not cached by default. Each code to cache has to be listed, and excluding a code from the policy disables negative caching for it.

Why the other options are wrong
"They get the same TTL as the successful responses" … The page says the TTL of successful responses (HTTP 2xx) is controlled by the default TTL and max TTL. That value is not read as the TTL of unlisted error codes.
"They get the same TTL as the 404 responses" … A TTL is set for each status code in the policy, so the value you give for 404 is not carried over to other error codes.
"They keep their default TTLs while the 404 TTL is overridden" … The page says Cloud CDN doesn't apply any default negative caching when a policy exists, so the default TTLs are not kept for the codes you leave out.

Key point
A line you add as a small change can alter how other codes behave. Check the TTL of each error response before and after the change.

Go to the Professional Cloud Network Engineer practice app (10 free questions; purchase unlocks all questions)

See the full practice set