Author Topic: Varnish cache rule  (Read 4058 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
Varnish cache rule
« on: May 11, 2021, 11:52:58 AM »
I need to disable Varnish caching for logged in wordpress users
The rule is for
Code: [Select]
sub vcl_recv {
   
Code: [Select]
if (req.http.cookie ~ "wordpress_logged_in") {
           return (pass);
}

if (req.http.Cache-Control ~ "(no-cache|no-store|private)") {
           return (pass);
}

When I paste it into /etc/varnish/conf.d/vhosts/MYDOMAIN.conf and rebuild the webserver, these rules are lost. Can I paste them somewhere else (template?) where it's not overridden after rebuilding the server?

Offline
*
Re: Varnish cache rule
« Reply #1 on: May 12, 2021, 06:27:54 AM »
VPS & Dedicated server provider with included FREE Managed support for CWP.
http://www.studio4host.com/

*** Don't allow that your server or website is down, choose hosting provider with included expert managed support for your CWP.

Offline
*
Re: Varnish cache rule
« Reply #2 on: May 12, 2021, 09:21:28 AM »
Thank you!