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

Improve Caching and Cache-invalidation #6

Merged
merged 5 commits into from
Sep 18, 2024

Conversation

nanafox
Copy link
Contributor

@nanafox nanafox commented Sep 18, 2024

This update improves the caching for products and categories by ensuring that items are fetched once from the database.
Subsequent calls asking for the same resource or data will be returned from the cached version.

To ensure that results are not stale, cached data are invalidated when an update or deletion occurs. This helps to ensure that users receive the latest resource or resources anytime they make a request.

The current test cases still pass after a few minor tweaks as a result of the new change.

@nanafox nanafox added enhancement New feature or request ruby Pull requests that update Ruby code labels Sep 18, 2024
@nanafox nanafox self-assigned this Sep 18, 2024
@nanafox nanafox enabled auto-merge (squash) September 18, 2024 11:26
@nanafox nanafox merged commit e2cc653 into main Sep 18, 2024
3 checks passed
@nanafox nanafox deleted the refactor/fix-cache-invalidation branch September 18, 2024 11:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request ruby Pull requests that update Ruby code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant