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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(backend): Remove cache timer to fix empty cache bug #3332

Open
wants to merge 1 commit into
base: release/v4
Choose a base branch
from

Conversation

BRKalow
Copy link
Member

@BRKalow BRKalow commented May 7, 2024

Description

Re-implementing #3321 for release/v4

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:

@BRKalow BRKalow requested a review from a team as a code owner May 7, 2024 03:18
Copy link

changeset-bot bot commented May 7, 2024

馃 Changeset detected

Latest commit: ef589e4

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

This PR includes changesets to release 6 packages
Name Type
@clerk/backend Patch
@clerk/fastify Patch
gatsby-plugin-clerk Patch
@clerk/nextjs Patch
@clerk/remix Patch
@clerk/clerk-sdk-node 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

@BRKalow
Copy link
Member Author

BRKalow commented May 7, 2024

!snapshot

@clerk-cookie
Copy link
Collaborator

Hey @BRKalow - the snapshot version command generated the following package versions:

Package Version
@clerk/backend 0.38.7-snapshot.vef589e4
@clerk/fastify 0.6.40-snapshot.vef589e4
gatsby-plugin-clerk 4.4.42-snapshot.vef589e4
@clerk/nextjs 4.29.13-snapshot.vef589e4
@clerk/remix 3.2.4-snapshot.vef589e4
@clerk/clerk-sdk-node 4.13.15-snapshot.vef589e4

Tip: Use the snippet copy button below to quickly install the required packages.
@clerk/backend

npm i @clerk/backend@0.38.7-snapshot.vef589e4 --save-exact

@clerk/fastify

npm i @clerk/fastify@0.6.40-snapshot.vef589e4 --save-exact

gatsby-plugin-clerk

npm i gatsby-plugin-clerk@4.4.42-snapshot.vef589e4 --save-exact

@clerk/nextjs

npm i @clerk/nextjs@4.29.13-snapshot.vef589e4 --save-exact

@clerk/remix

npm i @clerk/remix@3.2.4-snapshot.vef589e4 --save-exact

@clerk/clerk-sdk-node

npm i @clerk/clerk-sdk-node@4.13.15-snapshot.vef589e4 --save-exact


if (isExpired) {
cache = {};
}
Copy link
Member

Choose a reason for hiding this comment

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

馃敡 I would suggest we move the cache cleaning to loadClerkJWKFromRemote where the cacheHasExpired is used and keep this method pure.

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.

None yet

3 participants