I’ve had this issue for a while as my website has over 50,000 listings so the get posts query for related listings drastically slows down the load time of a listing. I ended up using WP Rocket to preload the pages but am never able to clear the cache, which means I rarely update plugins or make changes to the website.
As the last time I had reached out about this was about a year ago, I wanted to touch base again to see if there are any other solutions to this yet. Is it possible to stop the query from running every time without having to use a caching plugin?
Thank you for your feedback, we will try to optimize this. But, please note that without a cache, you can’t avoid database queries because WP needs to pull up data to display something. You can use LiteSpeed cache and cache the listing pages, then they will be like custom HTML. Also, you can remove related listings; then there will be one less get_posts query.