Menù

What Is a Cache HIT? How to Check If Page Cache Is Working on PrestaShop

Turning on page cache is a great first step, but it does not automatically mean your visitors are receiving a cached page. “Enabled” means the feature is turned on; a Cache HIT means a real request was actually served from a stored copy.

To know for sure if your store is delivering cached pages, you need to look behind the scenes at a real browser request.

Don't worry if you aren't a developer! This guide will show you exactly how to check this easily using Google Chrome and help you match your results to one of four common situations.

 

What is a Cache HIT?

A Cache HIT means the response came from a stored copy instead of being generated again for that request.

Imagine a restaurant. Generating a page from scratch is like cooking a meal to order. A Cache HIT is like serving a prepared meal that is already ready to go.

In this guide, we focus on two common cache layers for PrestaShop:

  • Super Speed Page Cache: stores a ready-to-serve version of the page on your server. Check the x-ss response header.
  • Cloudflare Edge Cache: can store the page on Cloudflare’s edge network and serve it before the request reaches your server. Check the cf-cache-status response header.

These layers work independently. If Cloudflare does not serve a cached copy, a server-side cache such as Super Speed may still serve the page from cache.

 

How to check in the Chrome web browser

For the most reliable result, test like a new visitor: use an Incognito/Private window, stay logged out and keep the cart empty.

  1. Open an Incognito/Private window in Chrome.
  2. Go to your storefront. The homepage is a good page to test.
  3. Press F12 on your keyboard, or right-click and select Inspect to open Developer Tools.
  4. Open the Network
  5. Make sure Disable cache is unchecked.
  6. Reload the page (Ctrl+R on Windows or Cmd+R on Mac).
  7. Click the main document request at the top of the Network list, usually your domain name or /.
  8. Open Headers and scroll to Response Headers.
  9. Look for x-ss and cf-cache-status.

Pro tip: Load the same page at least twice. The first visit may create the cache, especially after the cache has just been cleared.

 

Which case should you follow?

In this guide, we are using the Super Speed module and Cloudflare to demonstrate the four most common scenarios.

Choose the case based on the cache setup you are using, not on the result you see in the headers.

Your setupGo to
No Super Speed + No CloudflareCase 1
Cloudflare onlyCase 2
Super Speed onlyCase 3
Super Speed + CloudflareCase 4

 

Case 1: Not Using Super Speed or Cloudflare — Check Your Page Cache

Use this case if your store is not using Super Speed and is not using Cloudflare.

What you may see: There is no cf-cache-status, cf-ray, or x-ss header.

What this means: These headers cannot confirm a Cache HIT because your store is not using the two cache solutions checked in this guide. Your hosting provider, server, reverse proxy, or another module may still provide page caching.

What should you do?

ResultStatusSuggested action
Another page cache solution is already in useCheck its own HIT indicatorCheck its documentation or ask your hosting/technical team how that cache solution identifies a Cache HIT.
You are not sure whether another page cache existsCheck neededAsk your hosting provider or technical team whether the site already uses server/page caching and how to verify it.
No page cache solution is currently usedOptimization opportunityConsider enabling a page cache solution. Super Speed is one option if you want server-side page caching together with other PrestaShop performance optimizations.

 

Case 2: Using Cloudflare Only — Check Cloudflare Page Cache

Use this case if your domain is connected to Cloudflare but you are not using Super Speed’s page cache.

What you will see: Cloudflare headers such as cf-ray will be present. Check the value of cf-cache-status.

What the values mean: HIT means Cloudflare served the request from its edge cache. MISS, DYNAMIC and BYPASS all mean that Cloudflare did not serve this particular request from page cache, but for different reasons.

cf-cache-statusMeaning
HITCloudflare served this request from cache.
MISSCloudflare did not have a cached copy ready for this request. This can happen on a first visit or after cache is cleared.
DYNAMICCloudflare treated the response as dynamic and did not serve the HTML page from cache.
BYPASSA rule or request condition told Cloudflare to bypass cache for this request.

What should you do?

ResultStatusSuggested action
HITOKEverything looks good for this request. No action is needed.
MISSTest againReload the same page again. If it becomes HIT, Cloudflare cache is working. If MISS continues and you expect this HTML page to be cached, review your Cloudflare cache configuration.
DYNAMICNot cached by CloudflareThis can be normal for HTML pages. If you specifically want Cloudflare to cache this page, review your Cloudflare Cache Rules. If you do not plan to cache HTML at Cloudflare, consider a server-side page cache solution instead.
BYPASSCheck configurationReview Cloudflare Cache Rules, bypass conditions, and relevant cookies to confirm whether this page is intentionally excluded from cache.

 

Case 3: Using Super Speed Only — Check Super Speed Page Cache

Use this case if Super Speed Page Cache is enabled and your website is not using Cloudflare.

What you will see: There are no Cloudflare headers. Look for the x-ss response header.

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

What this means: Perfect! If x-ss contains “cached at”, Super Speed served this request from its stored page cache. This is direct evidence that Super Speed’s page cache is working for this request.

What should you do?

ResultStatusSuggested action
x-ss: cached at ...OKEverything looks good. Super Speed Page Cache is working for this request, so no action is needed.
x-ss: noneCheck neededFirst test again in an Incognito/Private window while logged out and with an empty cart, and load the same page at least twice. If you still see none, check whether the page type is enabled for Page Cache and review your Super Speed exclusions. If the result is still unexpected, contact PrestaHero support and include a screenshot of the Response Headers.
x-ss is missingCheck neededConfirm that Super Speed Page Cache is enabled and that you are checking the main HTML document request. If the header is still missing, contact PrestaHero support for help checking the configuration.

 

Case 4: Using Both Super Speed and Cloudflare — Check Both Cache Layers

Use this case if your store uses both Super Speed Page Cache and Cloudflare. Because Cloudflare sits in front of your PrestaShop server, check cf-cache-status first.

What you may see: If cf-cache-status is HIT, Cloudflare served the request from its edge cache before the request needed to reach your PrestaShop server.

Important: You may still see x-ss: cached at... in a Cloudflare HIT response. This does not mean the current request also reached Super Speed. Cloudflare may simply return the x-ss header that was stored with the cached response when it originally fetched the page from your server.

What should you do?

ResultStatusSuggested action
Cloudflare HITOKEverything looks good for this request. Cloudflare served the cached page, so no action is needed.
Cloudflare MISS / DYNAMIC / BYPASS + x-ss: cached at ...Page cache is still workingSuper Speed served the request from server-side page cache. No immediate action is required. Only review Cloudflare settings if you specifically expect this HTML page to be cached at Cloudflare’s edge as well.
Cloudflare MISS + x-ss: noneTest again firstReload the same page again because a MISS can occur before Cloudflare has a cached copy. If Super Speed still shows none, contact PrestaHero support for help checking the configuration.
Cloudflare DYNAMIC / BYPASS + x-ss: noneCheck configurationNeither layer served this request from page cache. First confirm the request should be cacheable. Then review Super Speed Page Cache settings/exclusions and, if Cloudflare HTML caching is expected, review Cloudflare Cache Rules or bypass conditions. If the result is still unexpected, contact PrestaHero support and include a screenshot of the Response Headers.

 

Quick Result & Action Guide

Use this table as a quick reference after you have completed the check above.

ResultStatusSuggested action
Super Speed: x-ss: cached at ...OKNo action needed.
Super Speed: x-ss: noneCheck neededRetest under clean guest conditions, then check Super Speed Page Cache configuration and exclusions.
Cloudflare: HITOKNo action needed.
Cloudflare: MISSRetestReload the same page. Review Cloudflare settings only if MISS continues and you expect the page to be cached.
Cloudflare: DYNAMICNot cached at CloudflareReview Cache Rules only if you want this HTML page cached at Cloudflare.
Cloudflare: BYPASSBypassedReview bypass rules/conditions if this page is expected to be cached.
Cloudflare not HIT + Super Speed cached at ...OK via Super SpeedNo immediate action needed; the page is still being served from server-side cache.

Need help with Super Speed? If a page that should be cacheable still does not show x-ss: cached at... after you follow the checks above, contact the PrestaHero support team and include a screenshot of the Response Headers so we can help you check the configuration.

Conteggio visualizzazioni articolo: 53 visualizzazioni