Forums › Forums › Search & Filter Pro › Cache at time interval
Tagged: cache
- This topic has 3 replies, 2 voices, and was last updated 4 years, 1 month ago by Trevor.
-
Anonymous(Private) October 27, 2020 at 6:21 pm #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(Private) October 28, 2020 at 7:06 am #264356Are 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); }
-
AuthorPosts