( domain: string, rules: RobotsRule[], env: Env, )
| 194 | * @param env - Environment with Cloudflare bindings |
| 195 | */ |
| 196 | export 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 |
no test coverage detected