Support Forums

The forums are closed and will be removed when we launch our new site.

Looking for support? You can access the support system via your account.

Forums Forums Search & Filter Pro Rebuild Cache from Code

Viewing 8 posts - 1 through 8 (of 8 total)
  • White
    #266664

    Hello,

    do_action('search_filter_update_post_cache', $post_id); – this clears thee cache of a particular post.
    But how can I rebuilt the cache of a search form (I am talking about the “rebuild cache” option on the search form edit screen) from code?

    Thanks.

    Trevor Moderator
    #266685

    There is no option or code to do this, sorry. Are you needing to do this after an import update of posts, such as when using WP All Import?

    For example, with WP All Import, see this post:

    https://support.searchandfilter.com/forums/topic/cache-at-time-interval/

    White
    #266690

    It’s not actually a post import. I am manually updating some post meta, based on some user activities, and I need to update the cache after it saves the post meta values. Without rebuilding the cache, filter result doesn’t update according with the new meta values.

    Trevor Moderator
    #266692

    If you are saving the data when editing a post, our cache should automatically update when you press the Update button for the post. Is it not doing that?

    White
    #266694

    I am updating the post from code.

    Trevor Moderator
    #266698

    From PHP or SQL?

    White
    #266703

    Using wp_update_post and update_post_meta.

    Trevor Moderator
    #266705

    Then you will need to update the data per post, using the code you first posted, by adding that to your code.

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

The forum ‘Search & Filter Pro’ is closed to new topics and replies.