Rebuild cache after AJAX request

Forums › Forums › Search & Filter Pro › Rebuild cache after AJAX request

Tagged: , ,

Viewing 2 posts – 1 through 2 (of 2 total)
  • Anonymous
    #34455

    On my site, logged in users have the ability to add and delete taxonomy terms on the frontend using AJAX (which triggers the wp_delete_term() and wp_insert_term() functions). Is there some way that I can rebuild the cache during each of these AJAX requests to reflect the changes? Thanks!

    Ross Moderator
    #34565

    Hi Daniel

    You can manually trigger the update of the cache for a single post using:

    do_action('search_filter_update_post_cache', 1984);

    Where 1984 is the ID of your post.

    Hope that helps!

Viewing 2 posts – 1 through 2 (of 2 total)

Search & Filter Support
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.

We also use cookies to store items in your cart as well as allowing your to login on the site.

You can adjust all of your cookie settings by navigating the tabs on the left hand side.

By continuing to use this site, you also agree to our Privacy Policy.