Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Add cache level setting to lower number of cache purges on high performance websites #478
We run a website which gets 1 million pageviews every day and even 800,000 pageviews in a single hour during peak traffic. We choosed not to use Varnish but WP Rocket as we expected we will be able to debug or tweak its behavior better. It turned out to be just that - we are able to tweak WP Rocket behavior and we are thankful for that, but here is what we found and believe should be improved -
WP Rocket does way too many cache purges:
I see it might make sense for some websites and to keep the next post link working. However wouldn't it be enough to do this when the post is first published or deleted only? Because currently when there is a new comment to the post, rocket_clean_post() is called and it clears all the adjacent posts as well.
While I see that your aim is to work well for 260k websites you should not forget about the high performance websites. I posted some emails to Caspar and it seems you want to keep your settings screens as simple as possible with few options available. So to provide some control over that cache level our suggestion would be for your to add caching presets like this:
I think such control would be very nice and make your plugin much more useful.
There could also be "Extreme" option which you limit the amount of cache purges done per minute by implementing some cache purge queue. Currenlty when our website gets 1 comment every 10 seconds, the homepage cache is cleared again and again (and the adjacent posts), so the server load is really an issue.