MCPcopy
hub / github.com/refined-github/refined-github / cacheKey

Function cacheKey

source/github-helpers/api.tsx:343–353  ·  view source on GitHub ↗
([query, options])

Source from the content-addressed store, hash-verified

341
342const v4 = mem(v4uncached, {
343 cacheKey([query, options]) {
344 // `repository()` uses global state and must be handled explicitly
345 // https://github.com/refined-github/refined-github/issues/5821
346 // https://github.com/sindresorhus/eslint-plugin-unicorn/issues/1864
347 const key = [query, options];
348 if (query.includes('repository() {') || query.includes('owner: $owner, name: $name')) {
349 key.push(getRepo()?.nameWithOwner);
350 }
351
352 return JSON.stringify(key);
353 },
354});
355
356const api = {

Callers

nothing calls this directly

Calls 1

includesMethod · 0.80

Tested by

no test coverage detected