• Resolved jamesdev

    (@jamesdev)


    What’s the correct way to disable the cache-control header to Cloudfront caches in all cases? If I run “curl -I https://example.com” I always get “X-Cache: Miss from cloudfront” and “Cache-Control: no-store, no-cache, must-revalidate”. I’ve tried with Browser Cache settings “Set expires header” on and off. I’ll get a cache hit from the browser but not from terminal. From the browser. the cloudfront cache also seems to expire quite quickly (10-20 minutes despite a 3600 expire time).

    Also, is there a way to preload cloudfront cache? I tried using the page cache cron but this didn’t seem to have an effect.

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @jamesdev

    Thank you for reaching out and I am happy to help!
    I am not quite sure I understand the questions and what you are trying to achieve. W3 Total Cache sets the Cache control header in the Browser Cache settings, and once set, the headers and the caching is in effect. If those are disabled, and you can still see some headers, it meanst those are not coming from the W3 Total Cache, so either server configuration or some custom rules are applied in this case.
    Meaning, you should check the AWS configuration and your server configuration for any cache control rules (apache or nginx depends on what you are using)

    You can only preload the W3 Total Cache created cache. When using FSD the cached files are served (html pages) which need to be fetched from the server.

    Thanks!

    Thread Starter jamesdev

    (@jamesdev)

    Thanks for the assist. After some testing, it looks like it’s an advert plugin that uses PHP sessions which adds the Cache-Control:

    Cache-Control: no-store, no-cache, must-revalidate
    Pragma: no-cache
    Expires: Thu, 19 Nov 1981 08:52:00 GMT

    I’m investigating now if there’s anyway to adjust PHP settings so that it doesn’t break the CF caching

    • This reply was modified 4 months, 1 week ago by jamesdev.
Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.