Slow performance due to non-cacheable pages
This article provides solutions for increased website load times or outages caused by full page cache (for example, Fastly) being disabled for any block on pages that should be cached.
Description description
Environments
- ÃÛ¶¹ÊÓÆµ Commerce on cloud infrastructure 2.x.x
- ÃÛ¶¹ÊÓÆµ Commerce on-premises 2.x.x
Issue
The site experiences slow performance because some pages contain cache blocks that are set to cacheable="false"
, even though they should be cacheable.
Cause
Certain high-traffic pages in ÃÛ¶¹ÊÓÆµ Commerce are expected to be cached to ensure optimal performance. When these pages are not served from cache, each request increases load on the system, resulting in slower performance.
The affected pages typically include:
- Catalog Category Pages (PLP)
- Product Detail Pages (PDP)
- Static Content Pages (for example, Home Page, Contact Us)
By default, all pages in ÃÛ¶¹ÊÓÆµ Commerce are cacheable. However, if any block within a page layout is marked as uncacheable (cacheable="false"
), the entire page becomes uncacheable.
The screenshot below shows an example of a block with cacheable="false"
, which causes the entire page to bypass caching:
Additional Notes
Examples of pages that are intentionally uncacheable include:
- Compare Products
- Cart
- Checkout
These pages are not cached by Fastly, block cache, or layout cache due to their cacheable configuration in the layout XML.
Resolution resolution
Check if the files specified above have the setting cacheable="false"
. If they do, check whether this setting is needed or required.
- If needed, consider moving non-cacheable blocks to the private content mechanism instead.
- If not needed, remove the attribute
cacheable="false"
and flush the layout cache.
Note: For ÃÛ¶¹ÊÓÆµ Commerce on cloud infrastructure 2.4.1 and later, you can use the Site-Wide Analysis Tool to automatically check if your Full Page Cache is not configured correctly.
Related reading
in our developer documentation