• Resolved Slava Abakumov

    (@slaffik)


    Found this code:

     foreach ($post_ids as $post_id) {
    if (++$i % 50 === 0) wp_cache_flush();

    Why do you do that? PHP has generators that will avoid the problems you are trying to solve by flushing all the cache.

    You are also clearing the data by other plugins. Please don’t do that.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Pavlo Samsonov

    (@samsonovteamwork)

    Thanks @slaffik, you’re absolutely right — that wp_cache_flush() was a legacy workaround from early testing during large batch loops.

    We’ve since removed it completely in version 6.1.1. As you mentioned, it was unnecessarily flushing unrelated data and interfering with other plugins.

    The updated logic reads data only and doesn’t require any cache clearing at all. Thanks for flagging it — appreciate the reminder!

    Best regards,

    LLMs Plugin Support Team

    Thread Starter Slava Abakumov

    (@slaffik)

    That’s awesome, thanks for addressing this quickly.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Why do you flush all cache every 50 posts?’ is closed to new replies.