Hi,<br><br>I want to cache POSTs but can't get varnish to do it, is it possible? If it makes it any easier, all requests through this cache will be of POST type.<br><br>So far I have changed the line in vcl_recv to look like this:<br>
<br>if (req.request != "GET" && req.request != "HEAD" && req.request != "POST") {<br><br>This resulted in the first request looking like this:<br><br> 10 RxRequest c POST<br>
10 RxURL c /autocomplete/autocomplete.xqy<br> 10 RxProtocol c HTTP/1.1<br> 10 RxHeader c User-Agent: Test client<br> 10 RxHeader c Host: durham:8630<br> 10 RxHeader c Content-Length: 84<br>
10 RxHeader c Content-Type: application/x-www-form-urlencoded<br> 10 VCL_call c recv<br> 10 VCL_return c lookup<br> 10 VCL_call c hash<br> 10 VCL_return c hash<br> 10 VCL_call c miss<br> 10 VCL_return c fetch<br>
11 BackendOpen b default 192.168.80.173 51082 192.168.80.101 8630<br> 10 Backend c 11 default default<br> 11 TxRequest b GET<br><br>As you can see it arrives as a POST and gets changed to a GET. After that all requests go through as "Cache hits for pass" which at least returns data from the backend even if it isnt cached.<br>
<br>I then added "set bereq.request = "POST";" to vcl_miss which does change the TxRequest to POST but still doesnt work.<br><br>Thanks!<br><br><br><br><br><br>