Caching is Not Always Appropriate

The cache can generally help with most sites and situations, but there are some types of sites for which caching is just not suitable. For example, an ads site.

Ad sites normally run customized PHP script which use unique query strings for each request. example.com?query=ABC is considered a different URL than example.com?query=DEF, even though they are both technically example.com. Because the query strings actually have an effect on the content displayed, they cannot be simply ignored, unfortunately. So, essentially, every single request for example.com would result in a separate cached entry because of its unique query string.

This has two effects:

  1. No visitor is ever served from cache, because each unique URL is a cache miss.
  2. The disk is filling up with thousands of generated copies of the same page, but is never serving any of them to anyone.

Our support team has seen this occur on a site with millions of versions of the page cached and 300GB of space quickly filled up.

For sites like these we recommend:

If your cache disk is filling up fast, you can try using a cron job to remove outdated cache files regularly.

  • Admin
  • Last modified: 2018/06/14 20:37
  • by Lisa Clarke