codejump

Caching Strategies — Series 3

Preview — 3 of 10 questions

A public URL returns French or English content based on Accept-Language. A shared HTTP cache currently serves the wrong language. Which response header makes that request field part of cache selection?

AContent-Language: en
BCache-Control: public
CAccept-Ranges: bytes
DVary: Accept-Language

A public response may be stored, but every subsequent reuse must first be validated with the origin. Which response directive expresses this?

ACache-Control: no-cache
BCache-Control: max-age=60
CCache-Control: no-store
DCache-Control: private

Ten thousand unrelated keys are populated at midnight with the same ten-minute TTL. Origin load spikes when they expire together. Which measure addresses that alignment?

AIncrease the cache's network connection limit.
BSwitch the eviction policy from LRU to FIFO.
CUse one singleflight lock per individual key.
DAdd bounded random jitter to each TTL.

Sign up free to play

Answer all 10 questions (7 more), see explanations for every answer, and track your score.