File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,11 @@ const per_page = 100;
2525/**
2626 * The TTL of the cached values, in seconds.
2727 */
28- const cacheTTL = 60 * 15 ;
28+ const cacheTTL = 60 * 15 ; // 15 min
29+ /**
30+ * The TTL of the cached values, in seconds.
31+ */
32+ const longCacheTTL = 60 * 60 * 24 * 10 ; // 10 days
2933
3034/**
3135 * A fetch layer to reach the GitHub API
@@ -252,7 +256,9 @@ export class GitHubCache {
252256 . filter ( path => path !== undefined )
253257 . filter (
254258 path =>
255- ! path . includes ( "/test/" ) && ( path === "package.json" || path . endsWith ( "/package.json" ) )
259+ ! path . includes ( "/test/" ) &&
260+ ! path . includes ( "/e2e-tests/" ) &&
261+ ( path === "package.json" || path . endsWith ( "/package.json" ) )
256262 ) ;
257263
258264 const descriptions = new Map < string , string > ( ) ;
@@ -278,6 +284,7 @@ export class GitHubCache {
278284 }
279285
280286 await this . #redis. json . set ( cacheKey , "$" , Object . fromEntries ( descriptions ) ) ;
287+ await this . #redis. expire ( cacheKey , longCacheTTL ) ;
281288
282289 return Object . fromEntries ( descriptions ) ;
283290 }
You can’t perform that action at this time.
0 commit comments