# Content Caching

Storefront Next uses a multi-tier strategy for caching content at different layers in the server architecture. First, the browser caches static content where it's served directly to end users. Then the site eCDN (Cloudflare) caches static content for globally distributed edge caching. Finally, storefront configuration and metadata are cached in Managed Runtime (MRT) for application-level caching. As requests move downstream, the B2C Commerce layer caches metadata, while B2C Commerce API (SCAPI) caches API response data.

![Storefront Next caching](https://a.sfdcstatic.com/developer-website/sfdocs/commerce-cloud/media/sfnext/sfnext-caching.png)

## Static Content

Static content refers to files and resources, such as JavaScript bundles, on a storefront site that are unchanged regardless of who requests them or when they're accessed. Storefront Next delivers static content to users as-is, without personalization or server-side processing. CDNs and the browser cache static content publicly as immutable, URL-addressable resources, typically with a greater than 99% cache hit ratio.

## Metadata Caching

Managed Runtime caches site and page metadata for faster page rendering.

## SCAPI Request Caching

Storefront Next performance and scalability depend heavily on web-tier caching of SCAPI responses.

SCAPI can store eligible `GET` responses in the web-tier cache and the content delivery network (CDN) cache. [Enable page caching](https://developer.salesforce.com/docs/commerce/commerce-api/guide/server-side-web-tier-caching.md#enable-caching) in Business Manager to use this implicit caching. Non-personalized response classification is a separate safety decision. See [Classify Non-Personalized Responses](/docs/commerce/b2c-commerce/guide/sfnext-api-integration.md#classify-non-personalized-responses).

:::note
Make only the necessary expansions in the request, as certain expansions have short cache entry live times. For example, unnecessarily including the "availability" expansion in requests to the Products and Product Search APIs reduces the cache hit rate drastically and negatively affects overall request performance. If no expand parameter is specified, then all expansions are selected.
:::

For cache eligibility, time-to-live values, and cache-status headers, see [SCAPI Caching](https://developer.salesforce.com/docs/commerce/commerce-api/guide/server-side-web-tier-caching.md) in the *B2C Commerce API Guide*. Cache status shows how a cache handled a response. It doesn't prove that the response is safe for all shoppers.

## HTML Documents

To support personalization, Storefront Next doesn't cache HTML documents.
