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)