Refreshing cache overloads server

I think I just experienced the following: With a very busy site, when the cache is emptied and enough people request the page before the cache has been refilled, each of those connections will cause the page to be recalculated, causing the site to be potentially overloaded. Could this be correct?

Would using memcached have the same issues?

Yes, that could theoretically happen if there are many users and pages take long to render (e.g. when grabbing a lot of child pages or when using an external API). For very busy sites it makes sense to use a separate staging site where changes are made. The changes can then be pushed to the main site and the cache can be built in the background before publishing the new version.

1 Like