mirror of
https://github.com/nestriness/cdc-file-transfer.git
synced 2026-01-30 14:15:36 +02:00
Uses a bazel --disk_cache to cache build outputs between builds. Bazel also has a local cache, e.g. in ~/.cache/bazel/_bazel_$USER/cache, but that one can't be used as it won't reuse data across checkouts. A disk cache is like a remote cache, except that it's on the local disk. Github first looks for a cache with the given exact key in the current branch, then in the main branch. If there's a cache hit, the cache isn't updated (they're read-only!). To prevent that caches become stale, they are timestamped using the current year and month, so that the cache is force-renewed every month. Bazel disk caches also just grow, so this technique prevents that the cache grows indefinitely, eventually causing cache trashing.