How to rebuild cache hook

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)
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.