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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: optimize graphql query performance #54

Merged
merged 3 commits into from
Aug 2, 2024
Merged

Conversation

ahonn
Copy link
Collaborator

@ahonn ahonn commented Aug 2, 2024

Changes

Copy link

vercel bot commented Aug 2, 2024

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

Name Status Preview Comments Updated (UTC)
utxo-stack-explorer ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 2, 2024 9:39am

@ahonn ahonn force-pushed the fix/query-performance branch from 0243d29 to b28213c Compare August 2, 2024 09:38
@ahonn ahonn marked this pull request as ready for review August 2, 2024 09:38
@ahonn ahonn merged commit 69a1568 into develop Aug 2, 2024
3 checks passed
@ahonn ahonn deleted the fix/query-performance branch August 2, 2024 10:09
@Cacheable({
namespace: 'CkbExplorerService',
key: (heightOrHash: string) => `getBlock:${heightOrHash}`,
ttl: ONE_MONTH_MS,
Copy link
Contributor

@Flouse Flouse Aug 2, 2024

Choose a reason for hiding this comment

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

If a block reorged, the block height's cache should be updated as well.
So the cache TTL for getBlock(height) may be shorter, while the cache TTL for getBlock(blockHash) can be longer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request P-Medium
Projects
None yet
Development

Successfully merging this pull request may close these issues.

接口性能问题 Add Cache for RgbppLatestTransactions
2 participants