Title: Cache Issue
Last modified: September 16, 2021

---

# Cache Issue

 *  [ardeth](https://wordpress.org/support/users/ardeth/)
 * (@ardeth)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/cache-issue-47/)
 * Hello amazing team,
 * When i add a product to whishlist, the whislist icon (on top right of my page)
   turns +1 but when i go back to home page the icon turns 0 again. When i purge
   all my cache on backend and refresh my home page than it become +1 again.
 * Could you please advise.
 * Regards
    Oguz
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fcache-issue-47%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Support [Antonio La Rocca](https://wordpress.org/support/users/therock130/)
 * (@therock130)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/cache-issue-47/#post-14881491)
 * Hi Oguz
 * I’m afraid the counter on the top right of your site is added by your theme
    
   In order to avoid cache problem, you should load it via ajax, as we do for ATW
   butons and other wishlist components
 * If you’re willing to do some coding, I could suggest you a [resource](https://support.yithemes.com/hc/en-us/articles/115001372967-Wishlist-How-to-count-number-of-products-wishlist-in-ajax)
   of our knowledgebase
    This describes how to create a wishlist counter updated
   via ajax Besides, I could help you to tweak this code to force counter update
   on page load
 *  Thread Starter [ardeth](https://wordpress.org/support/users/ardeth/)
 * (@ardeth)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/cache-issue-47/#post-14882076)
 * Hello Antonio,
 * Thank you for your promt reply. I have added to code in resource link you have
   shared to my child theme functions.php. Unfortunately nothing has happened.
 * I’d be appreciate if you could help me for further steps.
 * Thank you.
 *  Plugin Support [Antonio La Rocca](https://wordpress.org/support/users/therock130/)
 * (@therock130)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/cache-issue-47/#post-14893064)
 * Hi again
 * the code by itself isn’t enough
    it defines a new shortcode, that you’ll need
   to place in your header
 * So the next step is to override default header template of your theme, and replace
   current counter with `<?php echo do_shortcode( '[yith_wcwl_items_count]' ); ?
   >`
    (I’m afraid I have no more specific indications on this step, as it would
   vary from theme to theme)
 * Then we can move to next steps:
    1. customize template to make it look like your
   previous counter 2. make it automatically refreshed in ajax on page load

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

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

 * ![](https://ps.w.org/yith-woocommerce-wishlist/assets/icon-128x128.gif?rev=3129302)
 * [YITH WooCommerce Wishlist](https://wordpress.org/plugins/yith-woocommerce-wishlist/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/yith-woocommerce-wishlist/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/yith-woocommerce-wishlist/)
 * [Active Topics](https://wordpress.org/support/plugin/yith-woocommerce-wishlist/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/yith-woocommerce-wishlist/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/yith-woocommerce-wishlist/reviews/)

## Tags

 * [cache](https://wordpress.org/support/topic-tag/cache/)

 * 3 replies
 * 2 participants
 * Last reply from: [Antonio La Rocca](https://wordpress.org/support/users/therock130/)
 * Last activity: [4 years, 8 months ago](https://wordpress.org/support/topic/cache-issue-47/#post-14893064)
 * Status: not resolved