( owner: string, repo: string, env: Env, )
| 116 | * @returns Object with path and branch if found in cache, null otherwise |
| 117 | */ |
| 118 | export async function getCachedFilePath( |
| 119 | owner: string, |
| 120 | repo: string, |
| 121 | env: Env, |
| 122 | ): Promise<{ path: string; branch: string } | null> { |
| 123 | try { |
| 124 | const key = getRepoFilePathCacheKey(owner, repo); |
| 125 | const result = await getFromCache(key, env); |
| 126 | return result as { path: string; branch: string } | null; |
| 127 | } catch (error) { |
| 128 | console.warn("Failed to retrieve from cache:", error); |
| 129 | return null; |
| 130 | } |
| 131 | } |
| 132 | |
| 133 | /** |
| 134 | * Cache a file path for a repository file |
no test coverage detected