• Hello, I am reporting a performance-related issue that would affect high-traffic websites, especially those utilizing object caching while using the Worker plugin.

    In worker/src/MWP/EventListener/PublicRequest/SetHitCounter.php the countHit method often increments a hit counter stored in the wp_options table. The resulting call to update_option() triggers an UPDATE query and also invalidates the entire options cache, triggering a DB query.

    The volume of UPDATE queries (which lock the table) and subsequent SELECT queries can drastically impact website performance.

    Please provide 1 or more of the following solutions to mitigate the performance impact:

    1. An option to disable the hit counter
    2. An alternate storage mechanism for the hit counter value

    Thank you for your consideration.

Viewing 1 replies (of 1 total)
  • Plugin Support stefq

    (@stefq)

    Hello there. This is Stefan here, sorry for the late reply. As per your problem, it looks like your websites are using our WordPress Analytics feature and this is why the hit counter is making the changes to your wp_options table.
    There is an option to turn off the WordPress analytics within your dashboard settings.

    In order to achieve that, please go to your profile in the upper right corner> Settings> Advanced> scroll down to the bottom of the page and then tick the option ‘Turn Off WordPress analytics on my websites’ >Save changes, and the hit counter should stop triggering the updates into your database.

    Here is the screengrab:
    https://monosnap.com/file/DjvC5PNpgp7yQO2oVQI80Cazm9yiU7

    Let us know if you need any further assistance.

    Regards,

Viewing 1 replies (of 1 total)
  • The topic ‘Hit counter invalidates Options cache for every request’ is closed to new replies.