Title: Cache issue
Last modified: February 18, 2024

---

# Cache issue

 *  Resolved [ibro87](https://wordpress.org/support/users/ibro87/)
 * (@ibro87)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/cache-issue-63/)
 * Hi there, 
   Nice plugin. I am using current user role in the notification bar 
   that dynamically change based on WooCommerce purchase. I am also using WP-Optimize
   plugin for caching pages. When the page is cached, notification bar is cached
   too so user role remains unchanged after WooCommerce purchase. I was wondering
   is there any way to exclude notification bar from caching while keeping the page
   cached? Please let me know. Thank you!

Viewing 7 replies - 1 through 7 (of 7 total)

 *  Plugin Author [vaakash](https://wordpress.org/support/users/vaakash/)
 * (@vaakash)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/cache-issue-63/#post-17434512)
 * Hi [@ibro87](https://wordpress.org/support/users/ibro87/),
 * Thanks for using Announcer. Happy that you like it. I guess you are using the
   PRO version.
 * I understand the issue, but if a page is cached, we have to make ajax call to
   check the role of the current user and display the announcement based on that.
 * The plugin currently does not do that.
 * My understanding is that, pages should be cached only for guest users since they
   see only static content on the page. Logged in users see customized/dynamic content
   so caching is usually turned off. This applies not only to announcer but any 
   other plugin.
 * Please check if you can disable caching only for logged in users.
 * Let me know if that worked out and solved your issue.
 * Thanks,
 * Aakash
 *  Thread Starter [ibro87](https://wordpress.org/support/users/ibro87/)
 * (@ibro87)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/cache-issue-63/#post-17434573)
 * Hi [vaakash](https://wordpress.org/support/users/vaakash/),
   Thanks for the quick
   reply! I’m currently using free version but I’d definitely be willing to consider
   Pro version as well if we could make this work. 🙂Please note that WP-Optimize
   supports user caching which means logged out users see different content than
   logged in users even if the pages are cached. I know that caching for logged 
   in users is usually turned off but not in this case, which prevents your plugin
   from showing dynamic content in the announcement. Please also note that I’ve 
   tried to exclude dynamic content from caching with the help of “[Content No Cache](https://wordpress.org/plugins/content-no-cache/)”
   plugin, but that did not work either. Their shortcode wasn’t recognized by “Announcer”
   for some reason. Here’s the outcome for your own reference: [https://snipboard.io/nPCBSJ.jpg](https://snipboard.io/nPCBSJ.jpg)
   So, I’d be interested in making ajax call to check the role of the current user
   and display the announcement based on that if that’s the only option to make 
   it work. Is this something you can do on your side? Please let me know. Thanks
   again for the great plugin and your help so far!
 *  Plugin Author [vaakash](https://wordpress.org/support/users/vaakash/)
 * (@vaakash)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/cache-issue-63/#post-17434979)
 * Hi [@ibro87](https://wordpress.org/support/users/ibro87/),
 * Sure, I’ll try my best to see how I can help here.
 * Would it be possible to share your website url? Shall I create a user account
   and get a hands on with the issue? This would help me understand the problem 
   accurately.
 * Thanks,
 * Aakash
 *  Thread Starter [ibro87](https://wordpress.org/support/users/ibro87/)
 * (@ibro87)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/cache-issue-63/#post-17439826)
 * Hi there, 
   Great, your help is greatly appreciated! The website is still in development
   stage. I can give you temporary access to WP Dashboard if you tell me your email
   address. Thank you.
 *  Plugin Author [vaakash](https://wordpress.org/support/users/vaakash/)
 * (@vaakash)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/cache-issue-63/#post-17444891)
 * Hi [@ibro87](https://wordpress.org/support/users/ibro87/),
 * Can you please share the details on my contact form?
   [https://www.aakashweb.com/contact/](https://www.aakashweb.com/contact/)
 * I’ll check and update you via email.
 * Thanks,
 * Aakash
 *  Plugin Author [vaakash](https://wordpress.org/support/users/vaakash/)
 * (@vaakash)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/cache-issue-63/#post-17449325)
 * Hi [@ibro87](https://wordpress.org/support/users/ibro87/),
 * I’m looking forward for the details. Please do share it when possible.
 * Thanks,
 * Aakash
 *  Thread Starter [ibro87](https://wordpress.org/support/users/ibro87/)
 * (@ibro87)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/cache-issue-63/#post-17468988)
 * Hey there [vaakash](https://wordpress.org/support/users/vaakash/), 
   Sorry I have
   taken so long to reply. WP-Optimize support helped me create custom function 
   which automatically clears the cache after WooCommerce order is made. This makes
   it possible to show dynamic content in your plugin so no further assistance is
   needed from your side. Thanks again for your willingness to help! 🙂

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Cache issue’ is closed to new replies.

 * ![](https://ps.w.org/announcer/assets/icon.svg?rev=2325339)
 * [Announcer - Sticky Message Banner & Notification Bar](https://wordpress.org/plugins/announcer/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/announcer/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/announcer/)
 * [Active Topics](https://wordpress.org/support/plugin/announcer/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/announcer/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/announcer/reviews/)

 * 7 replies
 * 2 participants
 * Last reply from: [ibro87](https://wordpress.org/support/users/ibro87/)
 * Last activity: [2 years, 2 months ago](https://wordpress.org/support/topic/cache-issue-63/#post-17468988)
 * Status: resolved