alphagov/cdn-acceptance-tests — pull request #94 by mattbostock (2014-08-26 10:06:49+00:00)
Title: [#75803332] Add support for Cloudflare's CF-Cache-Status

Cloudflare's `CF-Cache-Status` header may contain one of the following[1]:
- HIT
- MISS
- EXPIRED
- STALE
- IGNORED
- REVALIDATED

Add support for `HIT` and `EXPIRED`.

I haven't implemented `STALE`, `IGNORED` or `REVALIDATED` because they only occur under very specific circumstances and so are less useful to us.

Note that I expected to see `IGNORE` rather than `MISS` on an object's first request, as per Cloudflare's documentation, but in reality the `IGNORE` status did not occur in my testing.

[1]: https://support.cloudflare.com/hc/en-us/articles/200168266-What-do-the-various-CloudFlare-cache-responses-HIT-Expired-etc-mean-

* * *

Also feature-flags the `X-Cache` tests not supported by Cloudflare and tests for a `HIT` status from Fastly's `X-Cache` headers.