This is an old revision of the document!


Cache may not help some site such as ads site

The cache can generally help with most of the sites and situations, but for some certain situation, for example, ads site, the cache may not help.

ads site normally runs some customized PHP script. Most of the time, the ads site will use different unique query strings for each request. Each request with different query strings will be treated as different URLs. In this case, there is no such one cache copy to serve a lot of requests, instead, there will be generated thousands of cache copies. Literally, it means the site is not being served from cache. It will create a disk problem whiling caching such thousands of requests. We do see millions of files have been created and taking some 300GB space very quickly.

For such site, we recommend:

  • You should not enable cache for it globally.
  • Another recommendation is, instead of turning on cache globally, you should selectively to choose the pages can be cached and setup cache with rewrite rules. for example, For whole page cache without ESI, dropping tracking-related query string is safe to do.

If you experience such cache disk issue, you can try some cron job to remove outdated cache files regularly.

  • Admin
  • Last modified: 2018/06/14 19:58
  • by Jackson Zhang