• Resolved yourfluf

    (@yourfluf)


    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

    (@owaisalam)

    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

    (@yourfluf)

    Hi @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

    (@owaisalam)

    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

    A more systematic solution for handling function unhooking like the object cache purge will definitely streamline future updates.

    Thread Starter yourfluf

    (@yourfluf)

    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)
  • You must be logged in to reply to this topic.