Menu

How to Configure Page Cache in Super Speed

Page Cache in Super Speed stores the generated HTML of selected PrestaShop pages. On the first eligible request, PrestaShop generates the page normally and Super Speed can save the resulting HTML. Later compatible requests can reuse that cached version instead of repeating the full PHP, database, module hook, and template-rendering process.

This means enabling Page Cache is only part of the setup. You also need to choose which pages to cache, set suitable cache lifetimes, and decide when old cache should be cleared.

For a deeper explanation of how the mechanism works, see What Is Full-Page Cache in PrestaShop and How Does It Improve Performance?.

 

Enable Page Cache

From the Super Speed configuration page:

  1. Go to Cache and Minification > Page Cache > Page Cache Settings.
  2. Enable the Page cache option.
  3. In Pages to cache, select the page types you want Super Speed to cache.

Super Speed only creates and serves page cache for supported page types that you enable. Requests such as POST, AJAX, Back Office, API requests, and URLs matching configured exceptions are not served through Page Cache.

When a selected page does not yet have a valid cached version, the request is a cache MISS: PrestaShop generates the page and Super Speed can store the result. A later compatible request can become a cache HIT and receive the saved HTML directly.

 

Select pages to cache and set cache lifetime

Each page type can have its own cache lifetime. The lifetime defines how long a cached version remains valid before it expires.

Pages that change frequently should normally use a shorter lifetime, while relatively static pages can be cached for longer.

The current Super Speed documentation provides the following starting points:

Page typeSuggested cache lifetimeWhen to adjust it
Home page1 dayUse a shorter period if banners, promotions, or homepage content change frequently.
Category page7 daysShorten it when products or category content change often.
Product page15 daysSuitable when product information does not change frequently.
CMS page30 daysStatic informational pages can generally use longer cache periods.
New products page7 daysShorten it if new products are added frequently.
Best-seller page7 daysAdjust based on how quickly your sales rankings change.
Supplier page30 daysUsually changes infrequently.
Manufacturer page30 daysUsually changes infrequently.
Contact page30 daysTypically contains relatively static content.
Prices-drop page1 dayKeep it shorter when promotions or prices change frequently.
Sitemap page7 daysShorten it if products, categories, or other indexed content change often.

These values are starting points rather than fixed requirements. Choose the lifetime according to how often each type of content changes on your store.

A long cache lifetime does not necessarily mean visitors must wait until that period expires before seeing an update. Super Speed can invalidate cached pages earlier when relevant content changes, depending on the automatic cache-clearing options you enable.

 

Configure automatic page cache clearing

Super Speed provides several options for clearing existing cache before its normal lifetime expires.

Automatically delete page cache when changing performance configuration

When enabled, Super Speed clears page cache after relevant PrestaShop performance settings are changed.

This is useful when configuration changes affect the HTML or frontend assets being delivered.

 

Automatically delete page cache when installing or uninstalling hooks

Enable this option if you want cache to be cleared when hook-related module changes could modify the storefront layout or content.

 

Automatically delete page cache when editing page data

This option helps keep cached content synchronized with changes made in the Back Office.

For example, when product data is edited and saved, the existing cache related to that product can be invalidated instead of remaining available until its normal lifetime expires.

For most stores, this is useful because it allows relatively long cache lifetimes while still refreshing content after important catalog changes.

 

Automatically delete page cache when adding or deleting a product from the cart

This option can help when displayed stock quantities need to reflect cart activity more immediately.

However, cart activity occurs frequently on active stores. Clearing affected cache after these actions can reduce overall cache efficiency and increase the amount of page regeneration required. Enable it only when this level of stock freshness is important for your storefront.

For more advanced configuration choices, see the Super Speed - Optimal Page Cache Configuration Guide.

 

Understand cache variants and dynamic content

The same URL does not always use one identical cache file for every visitor.

Super Speed can distinguish page cache according to relevant storefront context such as language, currency, country, customer group, cart state, shop, and optionally the visitor's user-agent/device context. This helps prevent a cached version created for one context from being incorrectly reused in another.

Because of this, seeing a cache MISS after changing language, currency, customer state, or another relevant context does not automatically mean Page Cache is malfunctioning. A new cache variant may simply need to be created.

Stores with custom modules or visitor-specific content may also need additional cache exceptions or dynamic loading. Instead of disabling Page Cache for the entire store, configure the affected page, module, or hook when possible.

See How To Disable Cache for Specific Pages/Features with Super Speed for the advanced exception settings.

 

Check that Page Cache is working

After configuring Page Cache, test it on the storefront rather than assuming that enabling the switch automatically produces a Cache HIT.

A simple test is:

  1. Open the store in an Incognito/Private browser window.
  2. Stay logged out and keep the cart empty for the initial test.
  3. Open a page type that you enabled for Page Cache.
  4. Load the same page at least twice. The first request may create the cache.
  5. Open your browser's Developer Tools > Network panel.
  6. Select the main HTML document request and check Response Headers.
  7. Look for the x-ss header.

When Super Speed serves the page from its stored page cache, the header contains a value similar to:

x-ss: cached at YYYY-MM-DD HH:MM:SS

If the cache is not detected, first confirm that the page type is selected in Pages to cache, test again under clean guest conditions, and check whether the URL or a related module is excluded from caching.

For the complete testing workflow, see What Is a Cache HIT? How to Check If Page Cache Is Working on PrestaShop.

 

Set up a cronjob (a scheduled task on your server) to clean expired page cache

When a cache lifetime expires, that cached version is no longer valid. When the page is requested again, Super Speed can generate a fresh cache version.

However, if an expired page is no longer visited, its old cache file may remain on the server. A cronjob can periodically remove these expired files and prevent unnecessary cache files from accumulating.

From the Super Speed > Help section, you can find the cronjob command and secure token required for your server. The module documentation recommends running the cache-maintenance cronjob once per hour.

For setup instructions, see How To Set Up Cronjob To Automatically Clear Cache In Super Speed.

Once Page Cache is enabled, start with suitable page types and lifetimes, verify that your storefront still works normally, and confirm that eligible requests can produce a Cache HIT. Super Speed lets you fine-tune cache clearing or exceptions per page type where your store's content freshness or dynamic behavior requires it.

Nombre de vues: 46 vues