Monorepo management for opam overlays
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Increase fetch cache timeout from 5 minutes to 1 hour

The previous 5-minute cache was expiring too quickly during typical
development workflows. An hour-long cache reduces redundant fetches
while still keeping data reasonably fresh. Use --refresh to force
fresh fetches when needed.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

+8 -8
+4 -4
bin/main.ml
··· 827 827 `I ("+N", "They have N commits you don't have"); 828 828 `I ("+N/-M", "Diverged: they have N new commits, you have M new commits"); 829 829 `S "CACHING"; 830 - `P "Remote fetches are cached for 5 minutes to improve performance. \ 830 + `P "Remote fetches are cached for 1 hour to improve performance. \ 831 831 Use $(b,--refresh) to force fresh fetches from all remotes."; 832 832 `S Manpage.s_examples; 833 833 `P "Show diffs for all repos needing attention (uses cache):"; ··· 850 850 Arg.(value & pos 0 (some string) None & info [] ~docv:"REPO|SHA" ~doc) 851 851 in 852 852 let refresh_arg = 853 - let doc = "Force fresh fetches from all remotes, ignoring the 5-minute cache." in 853 + let doc = "Force fresh fetches from all remotes, ignoring the 1-hour cache." in 854 854 Arg.(value & flag & info [ "refresh"; "r" ] ~doc) 855 855 in 856 856 let patch_arg = ··· 927 927 Arg.(value & pos 1 (some string) None & info [] ~docv:"REPO" ~doc) 928 928 in 929 929 let refresh_arg = 930 - let doc = "Force fresh fetches from all remotes, ignoring the 5-minute cache." in 930 + let doc = "Force fresh fetches from all remotes, ignoring the 1-hour cache." in 931 931 Arg.(value & flag & info [ "refresh"; "r" ] ~doc) 932 932 in 933 933 let run handle repo refresh () = ··· 985 985 Arg.(required & pos 0 (some string) None & info [] ~docv:"SHA" ~doc) 986 986 in 987 987 let refresh_arg = 988 - let doc = "Force fresh fetches from all remotes, ignoring the 5-minute cache." in 988 + let doc = "Force fresh fetches from all remotes, ignoring the 1-hour cache." in 989 989 Arg.(value & flag & info [ "refresh"; "r" ] ~doc) 990 990 in 991 991 let run sha refresh () =
+2 -2
lib/forks.ml
··· 8 8 9 9 (* ==================== Fetch Cache ==================== *) 10 10 11 - (** Default cache timeout in seconds (5 minutes) *) 12 - let default_cache_timeout = 300.0 11 + (** Default cache timeout in seconds (1 hour) *) 12 + let default_cache_timeout = 3600.0 13 13 14 14 (** In-memory cache of last fetch times *) 15 15 let fetch_cache : (string, float) Hashtbl.t = Hashtbl.create 64
+1 -1
lib/forks.mli
··· 84 84 3. Adding git remotes to my checkouts for each member's fork 85 85 4. Fetching remotes and comparing commit histories 86 86 87 - Fetches are cached for 5 minutes by default. Use [~refresh:true] to force 87 + Fetches are cached for 1 hour by default. Use [~refresh:true] to force 88 88 fresh fetches from all remotes. *)
+1 -1
lib/monopam.mli
··· 416 416 For each repository where a verse member is ahead (I_am_behind or Diverged), 417 417 retrieves the commit log showing what commits they have that you don't. 418 418 419 - Remote fetches are cached for 5 minutes. Use [~refresh:true] to force fresh 419 + Remote fetches are cached for 1 hour. Use [~refresh:true] to force fresh 420 420 fetches from all remotes. 421 421 422 422 @param proc Eio process manager