How we normalise cache keys at the edge
Two URLs that ask for the same image should hit the same cache entry. That sounds obvious until w=1200&q=60 and q=60&w=1200 show up as different keys.
Canonical order
Parameters are sorted, defaults are dropped and widths are rounded to the nearest 8 pixels unless you set exact=1. Our hit ratio went from 81% to 93%.
Accept-aware variants
With fmt=auto the negotiated format becomes part of the key, not the whole Accept header, which varies wildly between browser versions.