Menu

Page Cache vs Smarty Cache vs Browser Cache in PrestaShop: What's the Difference?

Page cache, Smarty cache and Browser cache all improve performance by reusing work that has already been done. The difference is where that reuse happens and what work it avoids.

In simple terms:

  • Page cache reuses the final HTML generated by PrestaShop.
  • Smarty cache reduces repeated template-related processing while PrestaShop is generating a page.
  • Browser cache lets the visitor's browser reuse static files it has already downloaded.

They are therefore not competing versions of the same cache. Each works at a different layer of the request.

 

The three cache types reduce different kinds of work

Cache typeWhere it worksWhat it reusesMain work reduced
Page cacheServer - before PrestaShop generates the pageGenerated page HTMLPHP, database, modules, hooks and template rendering on a cache hit
Smarty cacheServer - while PrestaShop is generating the pageSmarty-related cached output and template workRepeated template processing
Browser cacheVisitor's browserImages, CSS, JavaScript, fonts and other static assetsRepeated downloads of unchanged files

This distinction matters when diagnosing performance. A slow HTML response and repeated asset downloads are different problems, so they need different cache layers.

 

How each cache type works in PrestaShop

1. Page cache avoids rebuilding the whole PrestaShop page

Full-page cache works at the broadest server-side level.

Without page cache, a product or category request may require PrestaShop to run PHP logic, query the database, execute modules and hooks, process Smarty templates and finally generate the HTML response.

With page cache, the generated HTML can be stored for reuse.

The first eligible request is normally a cache miss: PrestaShop still generates the page. A later compatible request can become a cache hit, allowing the stored HTML to be returned without repeating much of the normal page-generation process.

This makes page cache especially relevant when repeated server-side page generation contributes significantly to TTFB or server load.

If you want a deeper explanation of this request flow, see What Is Full-Page Cache in PrestaShop and How Does It Improve Performance?.

Page cache also requires careful handling in ecommerce. The same URL may need different content depending on language, currency, country, customer group, cart state or other visitor context. Cache lifetime and invalidation must also keep stored HTML from becoming outdated.

These requirements make cache configuration especially important in an ecommerce environment. Super Speed supports this layer with full-page HTML caching, separate cache variations for relevant storefront contexts, configurable page lifetimes, cache invalidation and dynamic-content handling.

If you'd like to see how this layer can be configured with Super Speed, see How to Configure Page Cache in Super Speed module.

 

2. Smarty cache reduces template work during normal page generation

Smarty cache operates deeper inside PrestaShop's rendering process.

PrestaShop uses Smarty templates to turn store data into the HTML shown to visitors. Smarty-related caching allows reusable template work or cacheable template output to be stored instead of processing everything from the beginning each time.

The important difference from page cache is that PrestaShop is still processing the request.

A simplified comparison looks like this:

Page cache hit:

Request → reusable HTML found → HTML returned

No page cache hit, with Smarty caching:

Request → PrestaShop processing → database/modules/hooks → Smarty rendering with cached template work where applicable → HTML returned

Smarty cache can therefore make page generation more efficient, but it does not normally bypass the entire PrestaShop request in the way a full-page cache hit can.

It is also important not to confuse Smarty cache with a general object or memory cache such as Redis or Memcached. In Super Speed, the Smarty/server cache controls work with PrestaShop's native Smarty filesystem cache and related template settings; the module does not provide a standalone Redis or Memcached cache layer.

Understanding this distinction helps you configure the appropriate cache settings for PrestaShop's page-generation process. If you'd like to see how these settings can be configured with Super Speed, see How To Configure Server Cache and Minification Feature in Super Speed.

3. Browser cache avoids downloading the same static assets again

Browser cache works after the HTML reaches the visitor.

A typical page references many separate resources:

  • CSS files;
  • JavaScript files;
  • product and theme images;
  • icons;
  • web fonts.

Without effective browser caching, the visitor may repeatedly download unchanged resources while navigating the store or returning later.

Browser cache allows these files to remain on the visitor's device for a defined period. When the browser needs the same resource again and its cached copy is still valid, it can reuse that copy instead of downloading the file again.

That means Browser cache primarily reduces network requests and transferred data. It does not prevent PrestaShop from generating the HTML document itself.

For example, a store can have excellent browser caching while still having a high TTFB because PHP, database queries or page rendering are slow. Conversely, page cache may make the HTML response fast while visitors still waste time repeatedly downloading poorly cached static assets.

Because browser cache only helps when static resources are given appropriate cache lifetimes, configuration plays an important role in how effectively this layer reduces repeated downloads. Super Speed can configure browser-cache lifetimes for images, icons, CSS, JavaScript and fonts. It also manages GZIP alongside browser cache, although GZIP serves a different purpose: it reduces the size of supported resources during transfer rather than storing them for later reuse.

If you'd like to see how these settings can be configured with Super Speed, see How To Optimize Browser Cache for Performance in Super Speed.

 

Page cache, Smarty cache and Browser cache work at different stages of one request

The easiest way to understand the relationship is to follow a page request from beginning to end.

1. The visitor requests a page.

The request reaches the server.

2. Page cache checks whether reusable HTML already exists.

If there is a valid cache hit, the server can return the stored HTML and avoid much of the normal PrestaShop generation process.

If there is no valid page cache, PrestaShop continues processing the request.

3. Smarty cache can reduce template-related work during page generation.

PrestaShop still runs the necessary application logic, but reusable Smarty template work can reduce part of the rendering cost.

4. The browser receives the HTML and loads its resources.

CSS, JavaScript, images and fonts referenced by the page are requested.

5. Browser cache reuses static resources when possible.

Resources already stored in the browser do not need to be downloaded again until their cache expires or becomes invalid.

So the three layers address different stages:

Page cache → reduce page generation

Smarty cache → reduce template rendering work when generation is still required

Browser cache → reduce repeated static-resource downloads

Enabling one does not make the other two unnecessary.

 

Choose the cache layer based on the work you need to reduce

If server response is slow because PrestaShop repeatedly rebuilds the same pages, investigate full-page cache first.

If requests still need to be generated normally and template processing contributes to the workload, correctly configured Smarty caching can reduce repeated rendering work.

If the browser keeps downloading the same CSS, JavaScript, images or fonts, Browser cache is the relevant layer.

In practice, a well-optimized store can use all three because they solve different problems. Super Speed brings full-page cache, native PrestaShop Smarty cache controls and browser-cache configuration into the same module, but each feature still retains its own role.

The key distinction is simple:

Use page cache to avoid rebuilding reusable pages, Smarty cache to make necessary template rendering more efficient, and Browser cache to avoid transferring unchanged static resources repeatedly.

Views count: 67 views