Exclude cache for EDD minicart




Wordpress LScache Plugin: Exclude cache for EDD minicart

Last Updated on: Wed, 15 Apr 2026 00:00:02
Hi Folks, I have an EDD (Easy Digital Downloads) mini cart in the header. It displays cart items if they are saved in the edd_items_in_cart cookie. But, since the page is being cached, it displays a Your Cart is empty message. I hope you already get my problem. What I have done so far: ? Excluded edd_items_in_cart cookie in LsCache > Cache > Exclude cookie. Also, added a .htaaccess rule. ? Tried generating unix timestamp in the EDD cart container. `// get current date, time with seconds $current_date = date(Y-m-d H:i:s) // convert current date to unix timestamp $current_date_unix = strtotime($current_date) ` ? Added ajax=true & reload=1 attributes. ? Even tried adding an attribute data-no-lazy=1 which is actually for excluding images. Since the page is being cached, nothing above worked. I am NOT using ESI as I am in OpenLiteSpeed & Cloudflare CDN. Please let me know how can I exclude cache for Mini Cart? I have also opened this issue here. Thank you in advance.` This topic was modified 9 months, 3 weeks ago by Anuj Subedi. Reason: Fixed formatting The page I need help with: https://ibb.co/JjhL4VZ Hi, try add this into top of your .htaccess RewriteRule . - [E=Cache-Vary: edd_items_in_cart] then purge all best regards, Hello @CacheCrawler I think this rule did work (Still testing). I have now added on the top of .htaccess file https://ibb.co/3BmQD3X As far I know .htaccess file is overwritten by the LsCache plugin whenever the settings are tweaked. Also, it is overwritten by other plugins like WordFence. Is there a way to add this .htaccess rule RewriteRule . - [E=Cache-Vary:edd_items_in_cart] on the virtual host file of OpenLiteSpeed Server? Regards, Anuj it should be OLS webadmin console -> vhost -> rewrite tab Is this the same syntax RewriteRule . - [E=Cache-Vary:edd_items_in_cart] that goes in OLS > VHost > Rewrite? yes you may need to add RewrirteEngine On before this line Thanks a lot, @CacheCrawler Ill definitely try. I am marking this topic as resolved. Again, Thank you very much.



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



Reference