Skip to content

Conversation

@panteliselef
Copy link
Member

Description

Invalidate Session Verification on component unmount

Checklist

  • npm test runs as expected.
  • npm run build runs as expected.
  • (If applicable) JSDoc comments have been added or updated for any package exports
  • (If applicable) Documentation has been updated

Type of change

  • 🐛 Bug fix
  • 🌟 New feature
  • 🔨 Breaking change
  • 📖 Refactoring / dependency upgrade / documentation
  • other:

@panteliselef panteliselef requested a review from a team October 18, 2024 08:45
@panteliselef panteliselef self-assigned this Oct 18, 2024
@changeset-bot
Copy link

changeset-bot bot commented Oct 18, 2024

🦋 Changeset detected

Latest commit: 87aa6eb

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@clerk/clerk-js Patch
@clerk/chrome-extension Patch
@clerk/clerk-expo Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

const { subscribeCache, getCache, setCache, clearCache } = useCache<K, T>(params);

const staleTime = options?.staleTime || 1000 * 60 * 2; //cache for 2 minutes by default
const staleTime = options?.staleTime ?? 1000 * 60 * 2; //cache for 2 minutes by default
Copy link
Member

Choose a reason for hiding this comment

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

⚠️ ❓ This could be a possible breaking change! Before it would use 1000 * 60 * 2 for the 0 value.

Copy link
Member Author

Choose a reason for hiding this comment

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

We are not using staleTime 0 so we are safe

Co-authored-by: Stefanos Anagnostou <anagstef@users.noreply.github.com>
@panteliselef panteliselef enabled auto-merge (squash) October 18, 2024 13:06
@panteliselef panteliselef merged commit 1be6dac into main Oct 18, 2024
21 checks passed
@panteliselef panteliselef deleted the elef/user-607-invalidate-stored-verification branch October 18, 2024 13:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants