Caching a cache miss
Hi,
Question 1. Does Fastly “cache a cache miss”, if that makes any sense? Does it store a cache miss, rather than re-attempt to load the page?
Question 2. Does loading a page using curl cause different caching behavior, compared to a browser?
In testing, it seems like the answers are yes. ??? Here are some interesting results:
Following this procedure, everything is ok:
- purge all
- load http://www.example.com/articles/article1/ in Google Chrome or Firefox
- after one or two attempts, it is cached. X-Cache: HIT . Success.
This set of steps is broken:
- purge all
- curl -H “Accept-Encoding: gzip” -svo /dev/null -H “Fastly-Debug:1” (the same url as above)
- X-Cache: MISS
- repeat a few times
- now it appears to have “cached a cache miss” , somehow
- further attempts in Google Chrome or curl will fail with X-Cache: MISS
This set of steps is broken:
- purge all
- “CHECK CACHE” in Fastly. (the same url as above)
- now it appears to have “cached a cache miss”
- further attempts in Google Chrome or curl will fail with X-Cache: MISS
Any feedback is appreciated.
Thanks,
Sam
-
Nevermind. :-) Close the issue. So, it looks like this page was returning Set-Cookie. That header prevents caching, right? After removing the header, it is fixed. The puzzling aspect was that Set-Cookie was displayed in curl, however in Chrome or Firefox developer tools it was not showing a Set-Cookie header.
Please sign in to leave a comment.
Comments
1 comment