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

Implement caching for user data in UserService and UserController #12

Merged
merged 2 commits into from
Jul 4, 2024

Conversation

anasabbal
Copy link
Owner

  • Added CacheModule to GatewayModule to enable caching.
  • Implemented caching in UserService for methods createUser, findUserById, and getAllUsers using CacheManager.
  • Applied CacheInterceptor in UserController to handle caching at the controller level.
  • Used @CacheTTL decorator to set TTL for cached responses in UserController.

This change improves the performance by reducing the number of requests to the microservices for frequently accessed user data.

@anasabbal anasabbal self-assigned this Jul 4, 2024
@anasabbal anasabbal merged commit 99c8541 into develop Jul 4, 2024
7 checks passed
@anasabbal anasabbal deleted the NRA-10 branch July 4, 2024 19:02
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.

1 participant