Question: Why is my CDN Site not caching?
Environment: OnApp 5.X
To confirm your CDN site is not caching, use Curl command. You should always get a "MISS" as result. Refer to https://onapp.zendesk.com/entries/27847268-To-check-if-a-file-is-cached-or-not-cached-
When your CDN url is not caching, it can due to the following:
(1) Origin Cache-Control set as no-cache
(2) Cookies are enabled, you have to configure "ignore set cookies" in CDN resource advance settings.
(3) Expiry header comes before Cache-Control header. Our system will honor the order of web header. If expiry header is set at an old date, then the content will never be cached.
(4) You get a 301/302 redirection when you are performing "curl -I" on your cdn url. You may need to remove the redirection from the web origin, or use IP origin (if the redirection rule did not apply on IP).