[Varnish] #1536: 4.0.1 delivers instead of fetch
Varnish
varnish-bugs at varnish-cache.org
Tue Jun 24 23:14:40 CEST 2014
#1536: 4.0.1 delivers instead of fetch
------------------------------+----------------------
Reporter: little_butterfly | Type: defect
Status: new | Priority: normal
Milestone: Later | Component: varnishd
Version: 4.0.1 | Severity: normal
Keywords: must-revalidate |
------------------------------+----------------------
Hi
Just tried Varnish 4.0.1 (git HEAD as of today).
PUT requests with chunked encoding works now! :-) great!
What I cannot get to work is that some items are cached that should not
be.
Specifically, when the backend returns "must-revalidate", I would expect
Varnish to do a fetch (and the backend to sometimes respond with 304 and
no body, sometimes with an updated document).
But Varnish seems to just serve old content from the cache, which breaks
my app.
Log:
{{{
* << Request >> 14
- Begin req 13 rxreq
- Timestamp Start: 1403641419.835198 0.000000 0.000000
- Timestamp Req: 1403641419.835198 0.000000 0.000000
- ReqStart 127.0.0.1 47671
- ReqMethod GET
- ReqURL /dc/binding-from-12345678
- ReqProtocol HTTP/1.1
- ReqHeader Cache-Control: max-age=0
- ReqHeader Host: localhost
- ReqHeader Connection: keep-alive
- ReqHeader X-Forwarded-For: 127.0.0.1
- VCL_call RECV
- VCL_return hash
- VCL_call HASH
- VCL_return lookup
- Hit 2147483655
- VCL_call HIT
- VCL_return deliver
- RespProtocol HTTP/1.1
- RespStatus 200
- RespReason OK
- RespHeader Server: CouchDB/1.6.0 (Erlang OTP/R15B01)
- RespHeader ETag: "5-eaabf6a34aafb6faa42ae5ec41ca71ab"
- RespHeader Date: Tue, 24 Jun 2014 20:22:42 GMT
- RespHeader Content-Type: text/plain; charset=utf-8
- RespHeader cache-control: max-age=0, must-revalidate
- RespHeader X-Varnish: 14 7
- RespHeader Age: 57
- RespHeader Via: 1.1 varnish-v4
- VCL_call DELIVER
- VCL_return deliver
- Timestamp Process: 1403641419.836180 0.000982 0.000982
- RespHeader Content-Length: 999
- Debug "RES_MODE 2"
- RespHeader Connection: keep-alive
- RespHeader Accept-Ranges: bytes
- Timestamp Resp: 1403641419.836666 0.001468 0.000486
- Debug "XXX REF 2"
- ReqAcct 122 0 122 341 999 1340
- End
}}}
Note these:
- VCL_call HIT
- VCL_return deliver
And this one:
- RespHeader cache-control: max-age=0, must-revalidate
Seems to contradict each other.
Am I doing something wrong, or is Varnish not up to spec here?
--
Ticket URL: <https://www.varnish-cache.org/trac/ticket/1536>
Varnish <https://varnish-cache.org/>
The Varnish HTTP Accelerator
More information about the varnish-bugs
mailing list