[RN][0.86] Cache prebuilt iOS binaries in ~/Library/Caches/ReactNative#56846
Open
cipolleschi wants to merge 1 commit into
Open
[RN][0.86] Cache prebuilt iOS binaries in ~/Library/Caches/ReactNative#56846cipolleschi wants to merge 1 commit into
cipolleschi wants to merge 1 commit into
Conversation
Currently, Hermes, ReactNativeDependencies, and ReactNativeCore tarballs are cached only inside the Pods/ directory. This means every clean `pod install` (or deleting the Pods folder) triggers a full re-download from Maven, even if the same version was already downloaded before. This adds a shared cache layer at ~/Library/Caches/ReactNative/. On first download, tarballs are saved to the shared cache. On subsequent pod installs, if the local Pods cache is empty but the shared cache has the tarball, it is copied locally instead of re-downloaded. This benefits: - Clean installs after deleting Pods/ - Multiple projects using the same React Native version - CI environments with a persistent home directory Added descriptive log messages for each scenario (local hit, shared cache hit, cache miss + download) to aid debugging.
|
Warning JavaScript API change detected This PR commits an update to
This change was flagged as: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
Adds a shared cache layer at
~/Library/Caches/ReactNative/for prebuilt iOS tarballs(Hermes, ReactNativeDependencies, ReactNativeCore).
Pods artifacts dir and the shared cache.
pod installruns, if the local Podscache is empty but the shared cache has the tarball for
that version, it is copied locally instead of
re-downloaded from Maven.
Pods hit, shared cache hit, and cache miss (download).
This avoids redundant downloads when:
Changelog:
[IOS] [CHANGED] - Cache prebuilt iOS binaries (Hermes,
ReactNativeDependencies, ReactNativeCore) in
~/Library/Caches/ReactNative to avoid redundant downloads
across pod installs
Test Plan:
Cold start ==> Downloading
Warn shared cache, Empty Pods dir ==> Copy
Warm Cache, Pods folder populated ==> Nothing happens