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

fix: Changes URLRequest cache policy default #550

Merged
merged 1 commit into from
Dec 6, 2024

Conversation

calvincestari
Copy link
Member

@calvincestari calvincestari commented Dec 4, 2024

Fixes apollographql/apollo-ios#3483.

Given that if the Apollo iOS cache store had expiration features it would obey them I can support the argument that useProtocolCachePolicy is an equivalent default more-so than returnCacheDataElseLoad. This shouldn't change the behaviour that was implemented for apollographql/apollo-ios#3432 either

The differing behaviour is in whether the cache policy respects the original Cache-Control header directive re. expiration:

  • useProtocolCachePolicy is defined as "Use the caching logic defined in the protocol implementation, if any, for a particular URL load request."
  • returnCacheDataElseLoad is defined as "Use existing cache data, regardless or age or expiration date, loading from originating source only if there is no cached data."

@svc-apollo-docs
Copy link
Collaborator

svc-apollo-docs commented Dec 4, 2024

✅ Docs Preview Ready

No new or changed pages found.

Copy link

netlify bot commented Dec 4, 2024

Deploy Preview for eclectic-pie-88a2ba ready!

Name Link
🔨 Latest commit e9d5700
🔍 Latest deploy log https://app.netlify.com/sites/eclectic-pie-88a2ba/deploys/6750d0b7bd43360008e3d6b9
😎 Deploy Preview https://deploy-preview-550--eclectic-pie-88a2ba.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Dec 4, 2024

Deploy Preview for apollo-ios-docc canceled.

Name Link
🔨 Latest commit e9d5700
🔍 Latest deploy log https://app.netlify.com/sites/apollo-ios-docc/deploys/6750d0b7e8884800086c475d

Copy link
Contributor

@AnthonyMDev AnthonyMDev left a comment

Choose a reason for hiding this comment

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

LGTM thanks!

@calvincestari calvincestari merged commit 2112f97 into main Dec 6, 2024
35 checks passed
@calvincestari calvincestari deleted the fix/urlrequest-cache-policy-default branch December 6, 2024 21:46
BobaFetters pushed a commit that referenced this pull request Dec 6, 2024
BobaFetters pushed a commit to apollographql/apollo-ios that referenced this pull request Dec 6, 2024
BobaFetters pushed a commit that referenced this pull request Dec 6, 2024
f0b2a850 fix: Changes `URLRequest` cache policy default (#550)

git-subtree-dir: apollo-ios
git-subtree-split: f0b2a850945fe070b92a054584e55827fa4a0b15
BobaFetters pushed a commit that referenced this pull request Dec 6, 2024
…default

git-subtree-dir: apollo-ios
git-subtree-mainline: b5a267a
git-subtree-split: f0b2a850945fe070b92a054584e55827fa4a0b15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Apollo URLRequest.CachePolicy not respecting Cache-Control header
3 participants