Hey @andrew1977,
Comet Cache is a page caching plugin, which means that it takes the entire contents of what WordPress generates and then caches that to a static HTML file, which is then served upon future requests to save unnecessary database and PHP requests, thereby increasing the speed of serving the page and reducing the impact on server resources.
Since each page is cached in its entirety, it’s not possible to ‘exclude’ a specific portion of a page from the cache (e.g., the mini cart in your header). There is a technical way around this with what we call dynamic fragmentation, but there are lots of security issues related to such a feature, so we haven’t implemented it. There’s a feature request here that you can read more about this and leave a comment to show your vote for this feature if desired: https://github.com/websharks/comet-cache/issues/222
The best way around the issue you’re having is to have the cart feature powered by JavaScript instead of PHP, that way server-side page caching has no effect on the cart. That’s how most shopping cart features are programmed. They use Client-Side JavaScript to fetch the status of the cart, thereby ensuring that the contents of the cart stay updated even if the page itself is cached. You’ll need to consult with your site developer, or with the plugin developer for the cart/theme you’re using, to see if they can update the cart to use JavaScript, which would make it compatible with WordPress caching plugins like Comet Cache.
Good Evening,
Many thanks for the above response.
Just a courtesy reply to let you know that we have applied javascript to run this, and all is working well.
Thanks again.
Kind Regards,
Andrew