Should a website use cache? What is it, and what are the pros and cons?

October 5, 2023

Ross Ross Gerring

Cache in the context of websites refers to storing copies of files or data results in strategic locations, so that future requests for that data can be served more quickly. When a user visits a webpage, the cached version of the webpage is shown, reducing the load time of the page. Caching can be done at various levels, such as the browser level, server level, or even at the application level.

Why Do We Use Cache?

  1. Speed and Performance: Caching improves the load time of web pages by serving static or saved content, reducing the amount of work required to generate a page view.
  2. Reduced Bandwidth and Server Load: It minimizes the amount of data that needs to be transferred between the client, network, and server, therefore reducing bandwidth usage and server load.
  3. Improved User Experience: Faster loading pages lead to a better user experience and can contribute to higher user engagement and retention.
  4. SEO Benefits: Page load speed is a ranking factor for search engines, and thus caching can potentially improve SEO.

Common Cache Services

Several caching services and solutions might be used on Linux web servers, particularly with CMS platforms like WordPress and Drupal:

  1. Varnish: A popular HTTP accelerator, often used to cache content in RAM to reduce the load time.
  2. Redis: A robust in-memory data structure store, which can be used as a cache and message broker.
  3. Memcached: A general-purpose distributed memory-caching system, often used to speed up dynamic database-driven websites by caching data and objects in memory.
  4. NGINX: Although primarily a web server, NGINX can also be used as a reverse proxy server for caching and load balancing.
  5. Cloudflare: Not a Linux service per se, but a globally-distributed CDN (Content Delivery Network) that caches website content across numerous global locations to speed up access for users worldwide.
  6. W3 Total Cache or WP Super Cache: WordPress-specific plugins that provide various caching mechanisms.
  7. Drupal Cache: Drupal has its in-built caching mechanism, and additional modules like “Boost” or “Varnish” can be used to enhance caching in Drupal.
  8. AccelerateWP: – must be running CloudLinux OS, as Itomic often does.
  9. LiteSpeed Cache for WordPress (LSCWP): – must be running LiteSpeed web server, as Itomic often does.

Pros and Cons of Using Cache


  1. Increased Speed: Reduced load times and accelerated content delivery.
  2. Reduced Server Load: Diminished demand on the server resources.
  3. Improved User Experience: Smoother and more responsive user interactions.
  4. SEO Gains: Better ranking potentials due to improved load times.


  1. Stale Data: There’s a risk of users seeing outdated or stale data due to cached versions being served.
  2. Complexity: Implementing and managing caching can introduce additional complexity in system management and debugging.
  3. Storage Limitations: Some caching methods consume server memory, which might be a limitation depending on your hosting environment.
  4. Cache Invalidation Issues: Managing when and how caches are invalidated (or cleared) can be challenging.

Note on Optimal Use of Cache

Caching should not be used as a crutch to prop up poorly performing websites. While it can mask performance issues to some extent by reducing load times, underlying issues (such as inefficient queries, poorly optimized assets, or bloated code) should be addressed directly for sustainable performance improvements. Optimal caching is most effectively deployed on a platform that is already optimized and error-free, ensuring that the cached content is both accurate and efficient. Using cache to bypass the need to address core performance issues may lead to more significant problems down the line, such as providing outdated information to users or stressing server resources during peak times when cache regeneration occurs.