Skip to content

Fix cache expiration-related issues in Auto Polling mode#106

Merged
adams85 merged 7 commits intomasterfrom
fix/autopolling-cache-expiration
Sep 6, 2024
Merged

Fix cache expiration-related issues in Auto Polling mode#106
adams85 merged 7 commits intomasterfrom
fix/autopolling-cache-expiration

Conversation

@adams85
Copy link
Copy Markdown
Contributor

@adams85 adams85 commented Sep 5, 2024

Describe the purpose of your pull request

This PR fixes multiple issues in Auto Polling mode:

  • Cache expiration should be checked in every poll iteration, not just in the first one to reduce network traffic when the SDK uses a shared cache (e.g. browser application using local storage running in multiple tabs).
  • Cache synchronization should happen even in offline mode in every poll iteration, not just in the first one to update in-memory cache when the SDK uses a shared cache.
  • Poll iterations should be protected with try-catch so a potential exception doesn't stop the loop.

Together with these corrections, the polling loop has been made consistent with the one in .NET SDK, which makes the timing of the polling iterations more accurate.

Related issues (only if applicable)

https://trello.com/c/gnqqRydc

Requirement checklist (only if applicable)

  • I have covered the applied changes with automated tests.
  • I have executed the full automated test set against my changes.
  • I have validated my changes against all supported platform versions.
  • I have read and accepted the contribution agreement.

@adams85 adams85 requested a review from a team as a code owner September 5, 2024 15:04
@adams85 adams85 force-pushed the fix/autopolling-cache-expiration branch 2 times, most recently from ca8dea6 to bf7a09f Compare September 5, 2024 15:19
@adams85 adams85 force-pushed the fix/autopolling-cache-expiration branch from bf7a09f to 308aa0e Compare September 5, 2024 15:20
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Sep 6, 2024

@adams85 adams85 merged commit d377986 into master Sep 6, 2024
@adams85 adams85 deleted the fix/autopolling-cache-expiration branch September 6, 2024 14:32
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.

3 participants