Forums Forums Search & Filter Pro How to rebuild cache hook

Tagged: 

Viewing 6 posts - 1 through 6 (of 6 total)
  • Anonymous
    #205812

    I’ve got a scheduled task that runs every 24hrs which updates an ACF checkbox depending on the published date. However when the scheduled task has run it updates the checkbox fine however it disappears from the search. If i update the post or clear the search cache it re appears.

    Is there a hook that i can include in my scheduled task to rebuild the search cache after the checkboxes have been updated?

    Many thanks
    Jason

    Trevor
    #205816

    As long as you know the post ID (or have an array of Post IDs), you can use this:

    https://searchandfilter.com/documentation/action-filter-reference/#update-cache-for-a-particular-post

    Anonymous
    #206356

    Thanks for your response. Is there a hook to completely clear the cache?

    Trevor
    #206358

    There is not, I am sorry.

    Anonymous
    #206393

    Hi again. Is there a do_action to clear the cache based on ID?

    Trevor
    #206395

    Again, sadly, there is not.

Viewing 6 posts - 1 through 6 (of 6 total)