WebPagetest Forums

Full Version: Bizarre Caching Results
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I've been getting very inconsistent caching results and I'm trying to understand the issue.

when i run my test against the elb directly, i get this result:

http://www.webpagetest.org/result/160205_72_ZM/

but when i run a test against the live site (which is using fastly as it's cdn) i get horrible results:

http://www.webpagetest.org/result/160205_5A_2M7/

I used to get consistent caching results regardless (minus the cdn check of course). I recently have been tweaking my cache times, in order to increase my score, setting my maxage for images to a year since they almost never change.

In the first, non CDN, result you can see those are now properly cached as you'd expect.

In the second, Fastly result, you can see that they inexplicably have a cache time of 3.9 days? Nowhere am I setting the cache time to 3.9 days. And why only the /images folder, the /fonts folder also has a maxage of 1 year. Is this a Fastly default, if so, why are they no longer respecting my cache headers here?

The only other difference re: caching that I've made here beyond upping /image and /font maxage is I'm now setting stale-while-revalidate and stale-if-error times. Is it possible that webpagetest just doesn't support those features yet?

Thanks
Be more specific about which exact object/resource/file you consider good + horrible.

At first glance, times seem similar.

Be very specific + likely someone can assist you.
I'm thinking your "stale-while-revalidate" header is causing the shorter Fastly cache times.

public, max-age=31536000, stale-while-revalidate=86400, stale-if-error=604800
(02-11-2016 02:13 AM)pmeenan Wrote: [ -> ]I'm thinking your "stale-while-revalidate" header is causing the shorter Fastly cache times.

public, max-age=31536000, stale-while-revalidate=86400, stale-if-error=604800


Ah, I see. I guess it's just confusing to me why these warnings only show up on webpagetest? Just stricter criteria for grading?

I'll up the revalidate times and see if that helps, thanks.
Reference URL's