---
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/67fb8580ac3c5b372617ee3ec3fc8f2bc9f16174/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`
