Skip to content

Comments

Fix: Login Polling Without Cached Responses#128

Merged
i2h3 merged 1 commit intodevelopfrom
alamofire-no-cache-v2-login
Mar 11, 2025
Merged

Fix: Login Polling Without Cached Responses#128
i2h3 merged 1 commit intodevelopfrom
alamofire-no-cache-v2-login

Conversation

@i2h3
Copy link
Collaborator

@i2h3 i2h3 commented Mar 10, 2025

@mpivchev figured it out and deserves the credit, I just cleaned up and squashed the branch.

The problem solved is that the iOS app polls some servers infinitely because their negative response is cached client-side even after the user granted app password in the web.

@i2h3 i2h3 added the bug Something isn't working label Mar 10, 2025
@i2h3 i2h3 requested review from marinofaggiana and mpivchev March 10, 2025 15:08
@i2h3 i2h3 self-assigned this Mar 10, 2025
@i2h3 i2h3 changed the base branch from main to develop March 10, 2025 15:09
@i2h3 i2h3 enabled auto-merge (rebase) March 10, 2025 15:19
@marinofaggiana
Copy link
Member

@mpivchev you can use unauthorizedSession and add the requestCachePolicy = .reloadIgnoringLocalAndRemoteCacheData ;)

Copy link
Member

@marinofaggiana marinofaggiana left a comment

Choose a reason for hiding this comment

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

use unauthorizedSession without caching

Signed-off-by: Milen Pivchev <milen.pivchev@gmail.com>
@i2h3 i2h3 force-pushed the alamofire-no-cache-v2-login branch from 23d9268 to 73a3649 Compare March 11, 2025 08:32
@i2h3 i2h3 requested review from marinofaggiana and mpivchev March 11, 2025 08:33
@i2h3
Copy link
Collaborator Author

i2h3 commented Mar 11, 2025

I updated the branch as requested by @marinofaggiana.

@i2h3 i2h3 merged commit eed1b57 into develop Mar 11, 2025
4 checks passed
@marinofaggiana marinofaggiana deleted the alamofire-no-cache-v2-login branch March 11, 2025 08:44
@mpivchev
Copy link
Collaborator

@marinofaggiana @i2h3 no cache option is applied to the whole session, are you sure this won't break other requests?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants