Performance

What is Caching?

Caching is the process of storing copies of frequently accessed data in a temporary, faster storage layer. In web hosting, caching dramatically improves page load times by serving pre-generated content instead of rebuilding it for every request.

How Does Caching Work?

Web caching operates at multiple levels: browser caching stores assets locally on the visitor's device, CDN caching stores content on edge servers globally, server-side caching stores generated HTML pages or database query results in memory (using tools like Redis or Memcached), and application-level caching stores computed results.

Effective caching can reduce server load by 90% or more. Static sites are inherently cache-friendly since every page is pre-built. For dynamic sites, cache headers (Cache-Control, ETag, Expires) tell browsers and CDNs how long to keep cached copies. Cache invalidation — knowing when to serve fresh content — is famously one of the hardest problems in computer science.

Related Terms