How do I prevent caching of pages with url parameters?
-
Recently I’ve been having issues on my site where I’ll update a post and my site will timeout and throw a 500 error. After much experimentation, it turns out that clearing my cache appears to fix the issue, at least until the cache fills back up.
My website has 268 posts and 4 pages, but a LOT of comments. I’ve disabled caching of all non-posts and pages. And yet somehow my wp-cache is generating over 20,000 cached files (none of them marked as expired), which appears to be impacting my site’s performance.
I’d expect to have closer to 272 cached files, not 20,000.
Clearing my cache and looking at the file list, I’m seeing lots of stuff like this:
https://www.siteurl.com/page-name/?replytocom=251961. So I’m presuming that bots are following ALL of the comment response links, and wp-cache is treating those as separate page requests to cache.
Is there any way to tell wp-cache to ignore replytocom URL parameters? Ideas for other solutions?
- The topic ‘How do I prevent caching of pages with url parameters?’ is closed to new replies.