Foundation · 3 min
What you need to know
What is ecommerce caching?
Ecommerce caching stores a reusable copy of a response or computed result, so the system does not repeat the same work for every request. Each cache needs rules for who may share the copy, how long it is valid, and how it is refreshed.
How does caching make ecommerce sites faster?
Caching makes stores faster by serving existing files or data from a nearby, quicker layer instead of rebuilding or refetching them. It also reduces load on application servers, databases, and external services.
Browser cache vs server cache: what’s the difference?
A browser cache stores files on the shopper’s device for reuse, while a server cache stores shared or private results within the store infrastructure. A CDN is another shared cache between the browser and origin.
What is page caching?
Page caching stores a ready-made page response, so the application does not rebuild it for every visitor. It works best for public content and needs careful variation by language, currency, device, or other factors that truly change the response.
Can product pages be cached?
Yes, public portions of product pages can be cached, including layout, descriptions, and media. Live price, stock, customer eligibility and personalized content need shorter lifetimes, separate requests, or precise invalidation.
Can checkout pages be cached?
Checkout pages should not use shared public page caching because carts, addresses, prices and payment state are customer-specific and change quickly. Safe caching may still be used for static checkout assets and carefully scoped reference data.
Why is my store showing stale prices or inventory?
Stale prices or inventory appear when a cache keeps an old value after the authoritative record changes, or invalidation fails to reach every layer. Trace the value through browser, CDN, application, search and database caches to find the old copy.
How should ecommerce cache invalidation work?
Cache invalidation should begin from a successful source change and remove or replace every affected key in the correct order. Use versioned static assets where possible, define a maximum stale period, and monitor invalidation failures.
A quick store check
Classify each response as public static, public dynamic, customer-specific or transactional and assign a cache rule and invalidation owner.
Foundation · 2 min
Frequently asked questions
Can checkout be cached like a product image?
No. Checkout contains changing, customer-specific and transactional data that needs much stricter rules.
Does clearing every cache solve stale data safely?
It may provide temporary relief, but it can slow the store and hide the broken invalidation path.