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: cache products api calls #239

Draft
wants to merge 2 commits into
base: development
Choose a base branch
from

Conversation

idoros
Copy link
Contributor

@idoros idoros commented Nov 12, 2024

This PR introduces a caching mechanism for calls on the product category page to ensure faster page load times. The cache retrieves previously saved data for each request and automatically invalidates entries after one minute to keep data fresh. To prevent excessive memory usage, the cache holds a maximum of 10,000 entries, with the oldest entries discarded as new ones are added.

Before
https://github.com/user-attachments/assets/4966a4ba-7493-4331-8d5e-89b18cea9aab

After
https://github.com/user-attachments/assets/7b97037a-9564-4ae9-bd59-76bb2ffe7510

@idoros idoros added the enhancement New feature or request label Nov 12, 2024
@idoros idoros self-assigned this Nov 12, 2024
Copy link

netlify bot commented Nov 12, 2024

Deploy Preview for home-goods-store ready!

Name Link
🔨 Latest commit 3eb0c9c
🔍 Latest deploy log https://app.netlify.com/sites/home-goods-store/deploys/67337ae2b9098d00088e9bd2
😎 Deploy Preview https://deploy-preview-239--home-goods-store.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@idoros idoros changed the base branch from main to development November 12, 2024 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant