Hi,
on a webpage behind varnish, visitors can leave comments.
New comments are sent to the server via htmlform using POST.
The Problem is, that new comments are not visible until I clear the cache.
I tried to purge or ban some content from cache, after a post request is
sent. For example like this:
sub vcl_recv {
if (req.request == "POST") {
ban("req.http.host == " + req.http.host + "&& req.url == " +
req.url);
return (pass);
}
}
or this:
sub vcl_fetch {
if (req.request == "POST") {
ban("req.http.host == " + req.http.host + "&& req.url == " +
req.url);
set beresp.ttl = 0h;
}
}
or even this:
sub vcl_hit {
if (req.request == "POST") {
purge;
}
return (deliver);
}
Does anyone solved a problem similar to mine?
Sincerly,
Tobias
_______________________________________________
varnish-misc mailing list
[email protected]
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc