Skip to content
View as Markdown
View as Markdown

@salesforce/b2c-tooling-sdk / docs / getCachedContent

Function: getCachedContent()

getCachedContent(url, ttlMs): string | undefined

Defined in: packages/b2c-tooling-sdk/src/docs/content-cache.ts:132

Returns cached content for url from memory or a fresh-enough disk entry, or undefined on a miss. Thin wrapper over getCachedEntry.

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

string | undefined

Released under the Apache-2.0 License.