Forums Forums Search & Filter Pro Cache at time interval

Tagged: 

Viewing 4 posts - 1 through 4 (of 4 total)
  • Anonymous
    #264309

    Hi there!

    I’m having a little problem with the plugin that I hope you can help with. The data for the post type I’m using is updated every 30 minutes. Sometimes when I look at the page, it doesn’t show any results and I have to go in and rebuild the cache to fix it. How often is the cache rebuilt? Does it only happen when I change something and save it within the setup of the filter? My hope is that I can set the cache to rebuild every 30 minutes so it is consistent with my data updates. Is this possible?

    Thank you for your help!!

    Kristin

    Trevor
    #264356

    Are you using a plugin like WP All Import to update the posts? If so, you would need this code in your child theme’s functions.php file:

    add_action('pmxi_saved_post', 'wp_all_import_post_saved', 1000, 1);
    
    function wp_all_import_post_saved($id) {
        do_action('search_filter_update_post_cache', $id);
    }

    If you are also using Relevanssi (a third party text search replacement plugin) and have set the form to use it for text searches, it would need to be this:

    add_action('pmxi_saved_post', 'wp_all_import_post_saved', 1000, 1);
    
    function wp_all_import_post_saved($id) {
        do_action('search_filter_update_post_cache', $id);
        relevanssi_index_doc($id, true, relevanssi_get_custom_fields(), true);
    }
    Anonymous
    #264788

    Thank you soooooooo much!!! This seems to be working!! You have been so helpful! I can’t believe how wonderful your response time is and you always have the answers!!! 😀

    Trevor
    #264793

    Thanks for getting back to me. I will close this thread for now.

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