MCPcopy Create free account
hub / github.com/SAP-samples/cloud-cap-hana-swapi / cacheKey

Function cacheKey

scripts/scraper/cache.js:8–10  ·  view source on GitHub ↗
(pageTitle)

Source from the content-addressed store, hash-verified

6const CACHE_DIR = path.join(__dirname, '../data/cache')
7
8function cacheKey(pageTitle) {
9 return path.join(CACHE_DIR, encodeURIComponent(pageTitle) + '.json')
10}
11
12async function read(pageTitle) {
13 const file = cacheKey(pageTitle)

Callers 2

readFunction · 0.85
writeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected