You are here: Home
Support site for Tips and Tricks HQ premium products
Hi, thanks for the response. Varnish caching is enabled on all sites hosted at Pantheon, so it isn’t possible to turn it off or switch to a different plugin. However, the docs for the two cache plugins provided a good starting point. I was able to trace the issue to wp_affiliate_platform1.php, lines 7-9:
This means that the session is started on every page load, whether or not the current page is an affiliate referral. When a PHP session is started, it disables the Varnish cache.
I was able to get the cache working by modifying the code like this:
Can you see any issues with this approach or recommend a better way? Basically, I just want to make sure that the session is only started when needed for affiliate tracking or WP Affiliate Platform admin functions.