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

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

# Function: getCachedEntry()

> **getCachedEntry**(`url`, `ttlMs`): [`CachedEntry`](../interfaces/CachedEntry.md) \| `undefined`

Defined in: [packages/b2c-tooling-sdk/src/docs/content-cache.ts:103](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/67fb8580ac3c5b372617ee3ec3fc8f2bc9f16174/packages/b2c-tooling-sdk/src/docs/content-cache.ts#L103)

Returns the cached entry for `url` (with the tier that served it) from memory
or a fresh-enough disk entry, or `undefined` on a miss. A disk hit repopulates
the in-memory tier.

## Parameters

### url

`string`

The fetch URL used as the cache key

### ttlMs

`number` = `DEFAULT_CACHE_TTL_MS`

Max age for a disk entry to count as a hit (default 7 days)

## Returns

[`CachedEntry`](../interfaces/CachedEntry.md) \| `undefined`
