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

Function cacheRobotsTxt

src/api/utils/cache.ts:196–207  ·  view source on GitHub ↗
(
  domain: string,
  rules: RobotsRule[],
  env: Env,
)

Source from the content-addressed store, hash-verified

194 * @param env - Environment with Cloudflare bindings
195 */
196export async function cacheRobotsTxt(
197 domain: string,
198 rules: RobotsRule[],
199 env: Env,
200): Promise<void> {
201 try {
202 const key = getRobotsTxtCacheKey(domain);
203 await setInCache(key, rules, env, getCacheTTL());
204 } catch (error) {
205 console.warn("Failed to save robots.txt to cache:", error);
206 }
207}
208
209/**
210 * Check if vectors exist in cache for a repository

Callers 1

checkRobotsTxtFunction · 0.85

Calls 4

getRobotsTxtCacheKeyFunction · 0.85
setInCacheFunction · 0.85
getCacheTTLFunction · 0.85
warnMethod · 0.80

Tested by

no test coverage detected