Third Time’s the Cache, No More
Mar 19, 2021Edward Wang

Summary
This post details the evolution of Cloudflare's caching behavior for requests with query strings. Previously, these requests required three misses before being cached. This behavior, originating from 2010, was re-evaluated and found to be overly defensive. An A/B test demonstrated that caching on the first request for queries resulted in a minor, acceptable increase in disk writes (2.5%) while improving cache hit rates by an average of +3% for Enterprise customers and reducing origin bytes served by -5%. This change has been rolled out, leaving the 'third time's the charm' quirk behind.