File tree Expand file tree Collapse file tree
apps/server/src/pullRequest Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -145,6 +145,11 @@ const DETAIL_CACHE_TTL = Duration.seconds(60);
145145const MERGED_DETAIL_CACHE_TTL = Duration . minutes ( 10 ) ;
146146const detailTimeToLive = ( state : PullRequestState | undefined ) =>
147147 state === "merged" ? MERGED_DETAIL_CACHE_TTL : DETAIL_CACHE_TTL ;
148+ /**
149+ * Checks and the watch fingerprint stay short: they are how a running check's result reaches the
150+ * page and a watched pull request's change reaches its watch.
151+ */
152+ const CHECKS_CACHE_TTL = Duration . seconds ( 15 ) ;
148153const DIFF_CACHE_TTL = Duration . seconds ( 60 ) ;
149154/** A commit is content-addressed, so its own diff cannot change under its key. */
150155const COMMIT_DIFF_CACHE_TTL = Duration . minutes ( 10 ) ;
@@ -2971,7 +2976,7 @@ export const make = Effect.gen(function* () {
29712976 } ,
29722977 {
29732978 capacity : DETAIL_CACHE_CAPACITY ,
2974- timeToLive : ( exit ) => ( Exit . isSuccess ( exit ) ? DETAIL_CACHE_TTL : Duration . zero ) ,
2979+ timeToLive : ( exit ) => ( Exit . isSuccess ( exit ) ? CHECKS_CACHE_TTL : Duration . zero ) ,
29752980 } ,
29762981 ) ;
29772982
@@ -2995,7 +3000,7 @@ export const make = Effect.gen(function* () {
29953000 } ,
29963001 {
29973002 capacity : DETAIL_CACHE_CAPACITY ,
2998- timeToLive : ( exit ) => ( Exit . isSuccess ( exit ) ? DETAIL_CACHE_TTL : Duration . zero ) ,
3003+ timeToLive : ( exit ) => ( Exit . isSuccess ( exit ) ? CHECKS_CACHE_TTL : Duration . zero ) ,
29993004 } ,
30003005 ) ;
30013006
You can’t perform that action at this time.
0 commit comments