varnish 4 caching post requests

Wido den Hollander wido at widodh.nl
Mon Oct 19 09:40:50 CEST 2015



On 18-10-15 12:57, Miguel González wrote:
> Dear all,
> 
>   I have Varnish 4 in front of an Apache (Cpanel) hosting several
> websites running Wordpress.
> 
>   Everything works fine, but there are Wordpress plugins that perform
> POST resquests. I´ve seen various messages that in previous versions of
> Varnish you couldn´t cache POST responses (which you can do with Nginx).
> 
>   I don´t want to overcomplicate things and put Nginx between Varnish
> and Apache (I don´t want to miss the security side that Apache offers)
> and I was wondering if that has been solved in the newers versions of
> Varnish.
> 

I haven't used it, but it might be that vmod can do it for you?

std.cache_req_body(32MB);

https://www.varnish-cache.org/docs/trunk/reference/vmod_std.generated.html#func-cache-req-body

The docs say:

"Caching the req.body makes it possible to retry pass operations (POST,
PUT)."

So it seems you can only use it for restarting/retrying requests, but
you can always give it a try.

Wido

>   Regards,
> 
>   Miguel
> 
> _______________________________________________
> varnish-misc mailing list
> varnish-misc at varnish-cache.org
> https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
> 



More information about the varnish-misc mailing list