Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Map URL to cached data #23

Merged
merged 2 commits into from
Sep 20, 2024
Merged

Map URL to cached data #23

merged 2 commits into from
Sep 20, 2024

Conversation

olivaresf
Copy link
Member

Turbo iOS PR: hotwired/turbo-ios#215

Adds new caching behavior for path config.

Previously, we'd cache the last successfully downloaded version of a path config. This causes an issue when a user updates versions (e.g. path-config-v6.json to path-config-v7.json). Instead of saving the last successfully downloaded version, we now use the path's last component (i.e. the filename) for cache purposes.

@olivaresf olivaresf requested a review from jayohms September 19, 2024 22:50
@@ -94,8 +96,8 @@ final class PathConfigurationLoader {
return directory.appendingPathComponent(cacheDirectory)
}

var configurationCacheURL: URL {
cacheDirectoryURL.appendingPathComponent(configurationCacheFilename)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can the configurationCacheFilename constant be removed above now?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, removed!

@jayohms jayohms merged commit fc8e698 into main Sep 20, 2024
1 check passed
@jayohms jayohms deleted the cache-based-on-url branch September 20, 2024 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants