MCPcopy Create free account
hub / github.com/idosal/git-mcp / cacheIsIndexed

Function cacheIsIndexed

src/api/utils/cache.ts:238–251  ·  view source on GitHub ↗
(
  owner: string,
  repo: string,
  exists: boolean,
  env: Env,
)

Source from the content-addressed store, hash-verified

236 * @param env - Environment with Cloudflare bindings
237 */
238export async function cacheIsIndexed(
239 owner: string,
240 repo: string,
241 exists: boolean,
242 env: Env,
243): Promise<void> {
244 try {
245 const key = getIsIndexedCacheKey(owner, repo);
246 await setInCache(key, exists, env, getCacheTTL());
247 console.log(`Cached vector existence for ${owner}/${repo}: ${exists}`);
248 } catch (error) {
249 console.warn("Failed to save vector existence to cache:", error);
250 }
251}
252
253/**
254 * Fetch URL content with Cloudflare's tiered cache

Callers

nothing calls this directly

Calls 5

getIsIndexedCacheKeyFunction · 0.85
setInCacheFunction · 0.85
getCacheTTLFunction · 0.85
logMethod · 0.80
warnMethod · 0.80

Tested by

no test coverage detected