Skip to content

[Fortune][Exchange Oracle] Implement caching for public key retrieval in JwtHttpStrategy - #3371

Merged
flopez7 merged 1 commit into
developfrom
feat/exchange/public-key-cache
May 29, 2025
Merged

[Fortune][Exchange Oracle] Implement caching for public key retrieval in JwtHttpStrategy#3371
flopez7 merged 1 commit into
developfrom
feat/exchange/public-key-cache

Conversation

@flopez7

@flopez7 flopez7 commented May 28, 2025

Copy link
Copy Markdown
Contributor

Issue tracking

None

Context behind the change

Before this change, every authentication request triggered a call to the KVStore to fetch the public key, causing unnecessary network traffic.
Now, an in-memory cache with a 1-day expiration has been added in JwtHttpStrategy, so the public key is only fetched from KVStore once per day per address, significantly reducing redundant requests and improving performance.

How has this been tested?

Deployed locally and made some requests to see if cache works

Release plan

None

Potential risks; What to monitor; Rollback plan

None

@flopez7
flopez7 requested a review from Dzeranov May 28, 2025 13:33
@flopez7 flopez7 self-assigned this May 28, 2025
@vercel

vercel Bot commented May 28, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

5 Skipped Deployments
Name Status Preview Comments Updated (UTC)
faucet-frontend ⬜️ Ignored (Inspect) May 28, 2025 1:33pm
faucet-server ⬜️ Ignored (Inspect) May 28, 2025 1:33pm
human-app ⬜️ Skipped (Inspect) May 28, 2025 1:33pm
human-dashboard-frontend ⬜️ Skipped (Inspect) May 28, 2025 1:33pm
staking-dashboard ⬜️ Skipped (Inspect) May 28, 2025 1:33pm

@flopez7
flopez7 merged commit 7aebb1b into develop May 29, 2025
@flopez7
flopez7 deleted the feat/exchange/public-key-cache branch May 29, 2025 11:50
@flopez7 flopez7 mentioned this pull request May 29, 2025
17 tasks
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.

2 participants