QuestenaPractice that shows what to review next
Question 19

A cache forwards a POST to a URI it holds a stored response for, and the origin answers 303 (See Other). What must the cache do with the stored response for the target URI?

  1. Invalidate it only if the response also carries Cache-Control: no-cache
  2. Nothing, because POST responses are not cacheable in the first place
  3. Invalidate it, because 3xx counts as a non-error response to an unsafe methodCorrect answer
  4. Nothing; only 2xx responses trigger invalidation

Explanation

Invalidation is keyed on an unsafe method plus a non-error status, and the caching spec defines non-error as 2xx or 3xx, so a redirect invalidates just as a 200 would. Whether the POST response itself was cacheable is a separate question from whether it invalidates the stored entry.

Continue with this test

Start practice
Question 19: A cache forwards a POST to a URI it holds a stored response… · HTTP Semantics · Questena