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

#3546 - Added event api endpoint caching #3549

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

christianmorfordwaitessw
Copy link
Member

@christianmorfordwaitessw christianmorfordwaitessw commented Jan 24, 2025

Using npm stale-while-revalidate-cache package

image
image
Figure: Caching performance on endpoint (local dev)

Copy link
Contributor

github-actions bot commented Jan 24, 2025

Coverage report

St.
Category Percentage Covered / Total
🔴 Statements 0.19% 69/36356
🔴 Branches 6.12% 24/392
🔴 Functions 0.81% 3/371
🔴 Lines 0.19% 69/36356

Test suite run success

13 tests passing in 1 suite.

Report generated by 🧪jest coverage report action from 3bacc45

Copy link
Contributor

Deployed changes to https://app-sswwebsite-9eb3-pr-3549.azurewebsites.net

Copy link
Contributor

PageSpeed Insights

Category Score
Accessibility 95
Best practices 96
Performance 78
SEO 69

View the full report https://pagespeed.web.dev/report?url=https://app-sswwebsite-9eb3-pr-3549.azurewebsites.net

@christianmorfordwaitessw christianmorfordwaitessw marked this pull request as draft January 24, 2025 04:07
- Using `lru-cache` to limit memory growth
- Limiting cache key combinations to avoid key polluting
- Max length of presenter to avoid large key sizes
- LRU cache expires after 1 hour
Copy link
Contributor

Deployed changes to https://app-sswwebsite-9eb3-pr-3549.azurewebsites.net

Copy link
Contributor

PageSpeed Insights

Category Score
Accessibility 95
Best practices 96
Performance 77
SEO 69

View the full report https://pagespeed.web.dev/report?url=https://app-sswwebsite-9eb3-pr-3549.azurewebsites.net

@christianmorfordwaitessw christianmorfordwaitessw marked this pull request as ready for review January 24, 2025 06:47
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.

🐛 Bug - Events API is slow to return Past and Upcoming events
2 participants