Page caching overview

Caching is one of the most effective way of improving performance of web applications of all kinds. Generally speaking, there are two ways to cache: client-side (browser) and server-side. In addition, there are two types of content: public (available to multiple customers) and private (specific to one customer).

Magento page caching is synonymous with full-page caching; in other words, we cache the entire page. The Magento application gives you the following options:

  • The default caching mechanism which stores cache files in any of the following:

    • On the file system.

      You don’t need to do anything to use file-based caching.

    • Database
    • Redis
  • Varnish (recommended)

Cacheable and uncacheable pages

Cacheable and uncacheable are terms we use to indicate whether or not a page should be cached at all. (By default, all pages are cacheable.) If any block in a layout is designated as uncacheable, the entire page is uncacheable.

To create an uncacheable page, mark any block on that page as uncacheable in the layout using cacheable="false".

Examples of uncacheable pages include the compare products, cart, checkout pages, and so on.


Do not configure content pages (that is, catalog, product and CMS pages) to be uncacheable. Doing so has an adverse affect on performance.

Only HTTP GET and HEAD requests are cacheable. For more information about caching, see RFC-2616 section 13.

Public and private content

Private content on a page is intended for one user only; for example, a customer name or personalized recommendations for a logged-in customer. Rendering private content in a cached page is sometimes referred to as hole punching and we’ll discuss it in more detail in the next topic.


Public and private content