Response header Cache-Control: no-store




Wordpress LScache Plugin: Response header Cache-Control: no-store

Last Updated on: Wed, 15 Apr 2026 00:00:02
Hi, working on an XML Sitemap plugin, I wish to prevent the news sitemap to be cached at all times. Ive tested both no-cache and no-store like this but it does not seem to make a difference: add_filter( wp_headers, function( $headers ) // prevent proxy caches serving a cached sitemap $headers[Cache-Control] = no-store return $headers ) but even though the Cache-Control header is present in the response, the response headers also keep showing: x-lsadc-cache: hit You can se the headers in the link joined. Why is that? Do I need other headers or is there a constant that I can use? This topic was modified 1 year ago by Rolf Allard van Hagen. The page I need help with: https://ledeliceenbalade.com/sitemap.xml Hi, No ,litespeed cache header is different than cache-control and it wont respect that one you need to do if ( defined( LSCWP_V ) ) do_action( litespeed_control_set_nocache, no-cache for sitemap URL ) in your code Best regards, Okay, and does the plugin respect the DONOTCACHEPAGE constant, as several others like WP Super Cache, W3 Total Cache and WP Fastes Cache do? Hi, that ought do it as well but we have an option to let user to choose either obey or ignore DONOTCACHEPAGE I have seen some cases , some plugins defines it and make entire site becomes no-cache though. Best regards,



LiteCache Rush: Speed comes from using less, not from doing it faster



Reference