gcping icon indicating copy to clipboard operation
gcping copied to clipboard

Cloud CDN

Open imjasonh opened this issue 8 years ago • 3 comments

Might be as simple as adding Cache-Control: max-age=0 on pong responses? The backend-service is already configured with --enable-cdn

  • https://cloud.google.com/cdn/docs/

imjasonh avatar Mar 10 '17 17:03 imjasonh

You can also use gcloud beta compute backend-service update $NAME --cache-mode=FORCE_CACHE_ALL to forcibly cache the responses (as of gcloud SDK 309.0.x).

elithrar avatar Sep 08 '20 19:09 elithrar

You can also use gcloud beta compute backend-service update $NAME --cache-mode=FORCE_CACHE_ALL to forcibly cache the responses (as of gcloud SDK 309.0.x).

Is that going to force the browser to cache the response and result in vacuously fast response times after the first one?

imjasonh avatar Sep 09 '20 00:09 imjasonh

Only our side - it is effectively s-maxage. You can use --client-ttl=0 to force revalidation on the client or --custom-response-header=‘Cache-Control: no-cache’ to prevent browser caching entirely.

https://developer.mozilla.org/en-US/docs/Web/HTTP/Caching#Controlling_caching

The new gcloud should roll out tomorrow/this week.

On Tue, Sep 8, 2020 at 5:28 PM Jason Hall [email protected] wrote:

You can also use gcloud beta compute backend-service update $NAME --cache-mode=FORCE_CACHE_ALL to forcibly cache the responses (as of gcloud SDK 309.0.x).

Is that going to force the browser to cache the response and result in vacuously fast response times after the first one?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ImJasonH/gcping/issues/1#issuecomment-689218061, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAEQ4F5LIAMDD23XXVOQYDSE3D3NANCNFSM4DDGV7MA .

elithrar avatar Sep 09 '20 01:09 elithrar