---
editLink: false
lastUpdated: false
---

[@salesforce/b2c-tooling-sdk](../../modules.md) / [docs](../index.md) / setCachedContent

# Function: setCachedContent()

> **setCachedContent**(`url`, `content`): `void`

Defined in: [packages/b2c-tooling-sdk/src/docs/content-cache.ts:142](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/4cf43fc45515b297cb4f1d80249c5a896379e7b4/packages/b2c-tooling-sdk/src/docs/content-cache.ts#L142)

Stores freshly fetched content in both cache tiers. Disk write is best-effort.

## Parameters

### url

`string`

The fetch URL used as the cache key

### content

`string`

The fetched content to cache

## Returns

`void`
