Here is the output when running https://mathdatasimplified.com/?redirect_to=random&rutpdebug=2
Debug mode is on. We will only display the resulting URL, without redirecting.
We use redirect_to=random.
Query parameters:
array(7) {
[“fields”]=>
string(3) “ids”
[“ignore_sticky_posts”]=>
bool(true)
[“order”]=>
string(4) “DESC”
[“post_status”]=>
string(7) “publish”
[“post_type”]=>
string(4) “post”
[“posts_per_page”]=>
int(-1)
[“suppress_filters”]=>
bool(true)
}
We found 258 matching post(s) in the database.
We filled the cache with a lifetime of 60 seconds.
We picked a random post.
=> The resulting URL is: https://mathdatasimplified.com/2021/01/20/notify-send-send-a-desktop-notification-after-finishing-executing-a-file/
For more help visit the documentation.`
So it seems like it should redirect to that page, but it doesn’t. I use W3 Total Cache. Maybe that can cause the problem?
Actually somehow it works now! It may be because the new plugin takes a long time to load.
I think that is indeed a caching problem. Another plugin or a service like Cloudflare caches the first redirect and later skips the database query.