How to Set Varnish Cache-Control Headers

前端 未结 3 1358
梦如初夏
梦如初夏 2020-12-31 17:22

I am hoping someone can advise on the proper method for getting Varnish to send cache-control headers. Currently, my configuration is sending \"Cache-Control: no-cac

3条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-31 17:30

    Varnish ignores Cache-Control: nocache as per the documentation. Here is evidence confirming that:

    http://drupal.org/node/1418908

    To get that result, you should detect the header Cache-Control .nocache. from your backend, and then invalidate the cache, set the backend response to not cacheable, or issue max-age: 0 in the other header (I forget the name right now).

提交回复
热议问题