CF-Cache-Status: MISS With Google Cloud Storage

I have setup Cloudflare to setup a cname to point cdn.mydomain.com to c.storage.googleapis.com.

Google Cloud Storage assets links to the website are pointing to: https ://cdn.mydomain.com/images/sampleimage.jpg as an example.

The Google Cloud Storage files load fine on the website just fine, however Cloudflare is not caching the files even though the orange cloud is turned on. The headers look like:

Accept-Ranges: bytes
Cache-Control: public, max-age=14400
CF-Cache-Status: MISS
CF-RAY: 52a55f1f08a1254d-ORD
Content-Length: 43823
Content-Type: image/jpeg
Date: Wed, 23 Oct 2019 17:18:40 GMT
ETag: "a6b3384939a7528a3a35e19a6caacfe1"
Expires: Wed, 23 Oct 2019 21:18:40 GMT
Last-Modified: Tue, 22 Oct 2019 03:36:18 GMT
Server: cloudflare
Vary: Accept-Encoding
x-goog-generation: 1571715378896034
x-goog-hash: crc32c=pz/U1A==, md5=JoidDnfjhdasf09u3wwoh==
x-goog-metageneration: 1
x-goog-storage-class: STANDARD
x-goog-stored-content-encoding: identity
x-goog-stored-content-length: 43823
X-GUploader-UploadID: AEnB2UrUZAz-POasliwdyVDwu7gTVgnJGiF0yQXbjf89u3qor4jo98sdfojawlht4adiujoijfs

I’ve searched and searched Google and Cloudflare docs and can’t find anything that I’m missing. What am I doing wrong? Thanks!

Google is most likely sending some caching header which prevents Cloudflare from caching.

What is the actual URL?

Thanks for the quick response. Here’s the URL I’m testing this setup on:

That seems to be the very case.

image

You need to configure your server so that is allows actual caching.

1 Like

Oh wow, okay thanks for that. Strange the headers in Chrome show:

Cache-Control: public, max-age=14400

I’ll try setting headers on the files in GCS.

1 Like

Thats the header the Cloudflare proxies send. What I referred to comes from your server.

1 Like

I see, thanks for the help. Appreciate you checking that out!

This topic was automatically closed after 14 days. New replies are no longer allowed.