• Resolved 51nullacht

    (@51nullacht)


    Does Cachify set its own Cache-Control header? If not, which one should be set?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Cachify does not set any headers.
    If you should set any … well, short answer is “it depends”.

    Cached pages are kind of static for a certain timespan. But keep in mind, you have no control over client-side caches. So if you set “Cache-Control” or “Expires” to let’s say “access plus 12 hours” in your Apache/nginx config snippet and you hit the “flush cache” button in WordPress, clients might see the old page for up to 12 hours, if accessed previously. So new content it not immediately visible or some link might point to a deleted page.

    If there’s another caching proxy, CDN or similar between the site and your clients, it’s yet another decision to be made, where to cache. 1h public cache with a single proxy could theoretically result in 2h delay on the client.

    On mostly static sites with long caching times this can be tolerable. On sites with faster dynamic content, that’s likely not what you want.

    Caching still reduces server load, even without client-side caching. Serving static HTML is rather cheap compared to complete page rendering.
    A compromise can be long-time server-side (e.g. Cachify set to 24h) and short-time client-side (“Cache-Control: max-age=900, private” – 15min from access in the browser), so switching between pages within a short timeframe reduces network traffic.

    Cheers,
    Stefan

    Plugin Support Torsten Landsiedel

    (@zodiac1978)

    I mark this as resolved. If there are still open question, please post again or open a new thread.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Wich Header Cache-Control should be set?’ is closed to new replies.