Title: Unhook clear_cache_if_changed_api
Last modified: October 30, 2024

---

# Unhook clear_cache_if_changed_api

 *  Resolved [yourfluf](https://wordpress.org/support/users/yourfluf/)
 * (@yourfluf)
 * [1 year, 7 months ago](https://wordpress.org/support/topic/unhook-clear_cache_if_changed_api/)
 * Hi how can i unhook / not use ‘clear_cache_if_changed_api’ which is hooked into‘
   woocommerce_after_product_object_save’ in the BreezeAdmin class.
 * I update many products via restapi so it consistently invalidates my cache. Please
   consider adding a hook to skip

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

 *  Plugin Author [owaisalam](https://wordpress.org/support/users/owaisalam/)
 * (@owaisalam)
 * [1 year, 7 months ago](https://wordpress.org/support/topic/unhook-clear_cache_if_changed_api/#post-18109362)
 * Could you please share the number of API calls you’re making within a specific
   timeframe?
 * Regarding the hook you mentioned, it clears the cache after each API call completes,
   allowing you to see updated content. Could you also explain how it invalidates
   the cache in the process, as you indicated?
 *  Thread Starter [yourfluf](https://wordpress.org/support/users/yourfluf/)
 * (@yourfluf)
 * [1 year, 7 months ago](https://wordpress.org/support/topic/unhook-clear_cache_if_changed_api/#post-18109490)
 * Hi [@owaisalam](https://wordpress.org/support/users/owaisalam/). Basically one
   call a minute. eCommerce site with a lot of content.
 * To be more specfic, it’s my object cache I have a problem with being flushed 
   every minute.
 * Because `clear_cache_if_changed_api` calls `breeze_clear_all_cache` calls `Breeze_PurgeCache::
   __flush_object_cache()`
 *  Plugin Author [owaisalam](https://wordpress.org/support/users/owaisalam/)
 * (@owaisalam)
 * [1 year, 7 months ago](https://wordpress.org/support/topic/unhook-clear_cache_if_changed_api/#post-18115499)
 * To disable the function for purging the object cache, you can comment out the
   specified line in the `inc/breeze-admin.php` file, as shown in the screenshot.
   Once you’ve made this change and committed it, the object cache purge will be
   disabled.
   [https://phpstack-458710-2069236.cloudwaysapps.com/org-rep/unhook_clear_cach.png](https://phpstack-458710-2069236.cloudwaysapps.com/org-rep/unhook_clear_cach.png)
 * A more systematic solution for handling function unhooking like the object cache
   purge will definitely streamline future updates.
 *  Thread Starter [yourfluf](https://wordpress.org/support/users/yourfluf/)
 * (@yourfluf)
 * [1 year, 7 months ago](https://wordpress.org/support/topic/unhook-clear_cache_if_changed_api/#post-18115537)
 * I’ve already done that. Was asking for a more sustainable solution as what’s 
   not included in your message is I can’t update Breeze going forward

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

The topic ‘Unhook clear_cache_if_changed_api’ is closed to new replies.

 * ![](https://ps.w.org/breeze/assets/icon-256x256.gif?rev=3352595)
 * [Breeze Cache](https://wordpress.org/plugins/breeze/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/breeze/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/breeze/)
 * [Active Topics](https://wordpress.org/support/plugin/breeze/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/breeze/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/breeze/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [yourfluf](https://wordpress.org/support/users/yourfluf/)
 * Last activity: [1 year, 7 months ago](https://wordpress.org/support/topic/unhook-clear_cache_if_changed_api/#post-18115537)
 * Status: resolved