A website that feels instant is not doing anything magical. It is doing less work. Every time a page loads quickly, it is usually because the server avoided repeating something it had already worked out a moment earlier. That is what caching is: keeping the result of expensive work close by, so the next visitor gets it without waiting for the whole thing to happen again.
Drupal handles this with several layers stacked on top of each other, and we add one more in front at the network edge. Each layer solves a different part of the problem, and together they are the reason a well built site can respond in a fraction of the time it takes to assemble a page from scratch. None of it changes what your visitors see. It only changes how fast they see it.
Here is a tour of those layers, what each one does, and the part that is genuinely difficult: knowing exactly when a cached answer has gone stale and needs to be thrown away.
What instant actually means
Building a page is more work than it looks. Drupal has to load content from the database, work out which blocks and menus belong on the page, check what the current visitor is allowed to see, run everything through the theme, and turn it all into finished HTML. Done from scratch every time, that adds up, especially on a busy site where hundreds of people might ask for the same page within a minute.
Caching means doing that work once and reusing the result. The goal is that the second visitor, and the two hundredth, get a response that was prepared in advance. The difference between a page assembled fresh and a page served from a cache is the difference between a site that feels sluggish under load and one that stays quick no matter how many people arrive at once.
The page cache: serving a finished page
The first and fastest layer is the internal page cache, which serves complete pages to visitors who are not logged in. This covers most of the traffic on a typical marketing or content site: someone arrives from a search result or a link, and Drupal hands them a fully rendered page it already had ready. No database queries, no theming, no assembly. The page was built earlier for someone else, and everyone after that benefits.
Because anonymous visitors all see the same version of a public page, this layer is remarkably effective. It is the single biggest reason a content site can absorb a spike in traffic, a newsletter going out or a post doing well on social media, without slowing down.
The dynamic page cache: for pages that change per visitor
Not every page can be served identically to everyone. A logged in editor sees toolbars a visitor does not. A page might greet someone by name or show items in a cart. For these, serving one frozen copy to everyone would be wrong.
The dynamic page cache handles this cleverly. It caches the parts of the page that are the same for everyone and marks the parts that differ, so Drupal only has to rebuild the small personalized pieces and can reuse everything else. A page that looks unique to each person is still mostly made of shared, cacheable material, and this layer captures that shared portion so the expensive groundwork is not repeated on every visit.
The object cache: remembering the expensive middle steps
Underneath the page level caches sits a more general one. As Drupal builds a page, it works out many intermediate results: the structure of a menu, the output of a particular block, a configuration lookup, the result of a database query that took real effort. The object cache stores these smaller pieces so they can be reused across many different pages.
We run this layer in memory rather than on disk, which keeps these lookups extremely quick. The benefit shows up everywhere, even on pages that cannot be fully cached, because the building blocks they are made from are already prepared. It is the quiet layer most visitors never think about, and it does a large share of the work.
A network edge in front of everything
The layers so far all live on the server. The last one lives closer to your visitors. A content delivery network, or edge, is a set of servers spread across the world that can hold copies of your pages and assets and serve them from a location near each person. Someone visiting from another continent does not have to reach all the way back to the origin server for an image or a cached page; they get it from a nearby point instead.
This does two things at once. It makes the site feel faster for people far from where it is hosted, because the data has less distance to travel, and it takes load off the origin, because many requests never reach it. On our platform this edge tier also does duty for security and traffic control, but for performance its job is simple: keep the answer as close to the visitor as possible.
The hard part: knowing when to forget
Caching is easy to start and hard to get right, and the difficulty is almost entirely about invalidation. A cache is only useful while its stored answer is still correct. The moment you edit a page, every cached copy of it, and of every other page that showed a piece of it, is potentially out of date. Clear too much and you throw away good work and slow the site down. Clear too little and someone sees old content.
This is the problem Drupal handles genuinely well. It tracks what each cached item depends on, so when you change a piece of content it knows precisely which cached pages referred to it and clears exactly those. A menu edit invalidates the things that showed the menu. An article update clears the article and the listings it appears in, and leaves everything unrelated untouched. This bookkeeping is invisible and unglamorous, and it is the part that separates a caching setup that helps from one that quietly serves stale pages.
What this means when you hit save
For someone editing content, all of this is meant to be invisible, and that is the point. You change a headline, you press save, and the new headline is live. The page you edited rebuilds and re-caches with your change, while the rest of the site stays fast and untouched. You do not have to think about which layers held a copy or ask anyone to clear anything.
That combination is what we are aiming for: a site that is fast because most of the work is done ahead of time, and correct because the moment something changes, the parts that need refreshing are the only parts that do. The layers are technical, but the experience they add up to is simple. Your visitors get a site that feels instant, and your team gets to publish without ever thinking about the machinery underneath.
