Skip to content

Backgrounds

How-to Guides

Technical References

WooCommerce /

Caching for WooCommerce

Ideally, it is best to cache as much content as possible for maximum performance. However, that is not always possible with a WooCommerce store depending on user sessions or the need to dynamically load content such as cart updates or price and stock feeds.

WooCommerce sites are more likely to have content that cannot be cached for all users (i.e., cart contents, account pages) or content that should not be cached for long (i.e., product inventory counts, prices).

WooCommerce provides detailed documentation for subscription cache.

Dynamic content

Evaluate methods used on pages with dynamic content (content shown to the end-user as a result of past website behavior) and consider more performant options.

  • Dynamic content that is called or stored client-side (i.e., session data, unauthenticated calls to third party APIs, etc.) can be called or handled with JavaScript while the remaining portions of the page are static and served from the Varnish page cache. 
  • Pages with authenticated requests to third parties for content (i.e., inventory or price data feeds, similar requests that cannot be handled client-side) will need to be served uncached to account for nonce generation.

Last updated: June 04, 2021