X-LiteSpeed-Cache-Control

#1
I have a question I was hoping someone could help me with. I have a plugin on my Wordpress site that we have written. In certain instances, I want to switch off the cache or mark it as private cache, when a feature of the plugin is enabled.

I have tried the following php code and it doesn't seem to work:

header ("X-LiteSpeed-Cache-Control: private,max-age=3600");

or

header ("X-LiteSpeed-Cache-Control: no-cache");

Thanks
 
#3
I can share it if that's easier, but it's not a plugin issue of lightspeed cache, I am trying to disable the cache in my own plugin. So for example:

<?php

if ( have_rows('_geo_targeting_rules', $_id ) ) {

header ("X-LiteSpeed-Cache-Control: private,max-age=3600");

}

?>

A user will display offers based on Geo Location rules in some instances and the cache needs to be disabled for this to work.
 
Top