Hello @rashkoff
Thank you for your question and I am happy to assist you with this.
Yes, you can cache pages for logged-in users. The way to do this is to disable the option “Don’t cache pages for logged-in users” in Performance>Page Cache and exclude the specific pages from being cached in Performance>Page Cache>advanced>Never Cache following pages.
You can also only disable caching for certain user roles by enabling “Don’t cache pages for following user roles” (Don’t cache pages for logged-in users should also be disabled in this case) and only serve cache or logged-in users that have subscriber user role for example.
This being said, I must advise you to reconsider this as caching pages for logged-in users is not recommended due to the sensitive data that may be shared. If you are willing to test this, proceed with caution and make sure to exclude any pages from the cache that may have sensitive data.
Thanks!
Hi Marko,
thanks for the reply.
Yes, it’s very risky to do this, but the speed in woocommerce is really important.
The theme I’m using has ajaxify object and I’m testing of this can work for cart, stock etc.
Some more questions:
1. Is it possible to empty the cash only for specific category when order is procced?
2. Is it possible to forbid the flush cache when a plugin is turn on/off or using the theme personalizer? So the cache can be flush only manually or by cron job…
Thanks
Hello @rashkoff
Thank you for your feedback.
To answer both questions, you can disable all the settings in the Performance>Purge policy, and with those settings, the cache will not be purged automatically after any update you make on your websites.
You can create a custom cron and call the following:
w3tc_flush_url($url); – Flush single URL
w3tc_flush_all(); – Flush all cache
w3tc_flush_post( $post_id, $extras = null ); – Flush a single post
Thanks!
Hi Marko,
this is the section now:
https://tinyurl.com/2xjppwej
Still when a plugin is enable/disable or the theme personalizer is used, the cache is flush instantly. I need to keep the cache also in those scenarios and not only on page/post update.
Also, how to flush specifica product category after an order is procced?
Thanks
Hello @rashkoff
We’ve received your email via the support channel.
We’ve replied t it so please continue the correspondence there so we can avoid duplicating the answers.
Thanks!