Forums › Forums › Search & Filter Pro › Rebuild Cache in background and swap it after it has been created
Tagged: refreshing cache, V3
- This topic has 28 replies, 3 voices, and was last updated 4 years ago by Ross.
-
Anonymous(Private) March 9, 2020 at 5:06 pm #235964
Hi,
we append products to our quite big catalog via adding them with WP AllImport, e.g. we have 5000 products and ad 500.
It seems that this means we need to manually refresh the S&F Cache then which takes more than an hour now.
During this time our customers can only find the newly, up to that moment, cached files although many of the files did not change.
Or am I wrong and the cache will be updated automatically and I just didn’t wait long enough?
If we have to update manually:
Is there a possibility to refresh the cache “in the background” i.e. keep the old cache and once the refreshed one is finished the new one replaces the old one?Thanks,
Paul
Trevor(Private) March 9, 2020 at 5:52 pm #235993You should be able to use a filter in WP All Import to do this.
Add something like this in the child theme 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); }
Do a test import of a post and see if it has been added to the cache.
Trevor(Private) April 9, 2020 at 8:14 am #239499This post might therefore be relevant:
https://support.searchandfilter.com/forums/topic/cache-building/#post-238754
For now, you will need to trigger a manual cache build from the form design/edit page in admin. The button is on the top right of the edit page.
-
AuthorPosts