CloudFlare's caching behavior is strange

#1

If I keep sending HTTP requests to an API server under CloudFlare many times, CloudFlare will start to send old data within a period of time and every HTTP responses received will include a HTTP header: CF-Cache-Status: HIT . (The data received within that period of time will be the same)

If I use another HTTP client(For instance, browser) to send HTTP requests to the same URL, I won’t get old data, I will get the fresh one.

What I want to ask is what causes this strange behavior happened?

0 Likes

#2

What’s the Cache-Status from that fresh data request?

My first guess is it’s just hitting a different edge server that hadn’t cached the old data.

0 Likes