Varnish 4 Not Obeying no-store

Debraj Manna subharaj.manna at
Thu Jan 7 14:01:37 CET 2016


I have a response in which no-store is set. But varnish is still caching
the response for default 2 mins.

root at SPk-D-0534:/var/log# curl -i "localhost:8080"
HTTP/1.1 200 OK
Cache-Control: no-store
Date: Thu, 07 Jan 2016 12:59:38 GMT
Content-Length: 22
Content-Type: text/plain; charset=utf-8
X-Varnish: 32777 32775
Age: 5
Via: 1.1 varnish-v4
Accept-Ranges: bytes
Connection: keep-alive

Hello World No Cached

By vcl_backend_response looks something like below:-

sub vcl_backend_response {
    if (bereq.url ~ "^/rde_server/") {
       set beresp.ttl = 300s;
    if(beresp.http.Cache-Control ~ "no-store|no-cache") {
    unset beresp.http.Cache-Control;

Can some one let me know what is going wrong or I have to do some special
handling in vcl so that varnish does not cache the response with no-store
set in Cache-Control?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the varnish-misc mailing list