Forums Forums Search & Filter Pro Rebuild cache after All Import

Tagged: ,

Viewing 10 posts - 1 through 10 (of 61 total)
  • Trevor
    #204991

    That code should work, but a few users have found, like you, that it does not. Can you try an experiment?

    Do the import with that code in place, and then do the import again?

    Anonymous
    #205061

    Hi Trevor

    I just tried that with some new data but no luck. Once the cache was rebuilt, after the second import was finished, the figures changed quite drastically.

    Alan

    Trevor
    #205129

    You somehow need to see if that function is being used. These plguins might help:

    https://wordpress.org/plugins/debug-bar/
    https://wordpress.org/plugins/debug-bar-actions-and-filters-addon/

    Anonymous
    #205141

    I do use Query Monitor, which I believe does a similar thing.

    I did spot this in the actions on the Query Monitor plugin, if it’s of any interest.

    Search_Filter_Post_Cache->wp_shutdown()

    I did also echo the ID and ‘- cached’ in the same All Import function, which did show on the log so I know wp_all_import_post_saved is being used.

    Trevor
    #205157

    Are you able to look through the database and find our cache tables and see if the post data appears to be updated in there?

    The shutdown function is merely part of our code calling the WordPress shutdown action.

    Anonymous
    #205167

    How do I know if the post data in that table has been updated? I have rebuilt the cache since the last import so may have to wait now until the next import, in a few days.

    Trevor
    #205169

    Ah, yes, you would have to wait, unless you made a test post, and updated just that.

    Anonymous
    #205512

    It doesn’t look like the cache table is updating with the new imports. The most recent product added is ID 14523 but the cache table only references up to 14428.

    Trevor
    #205516
    This reply has been marked as private.
    Anonymous
    #205520

    Unfortunately not. I don’t know for sure that it ever worked. It was only very recently (maybe 3 weeks) that I added the function.

Viewing 10 posts - 1 through 10 (of 61 total)