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: Implement caching in DriverService for optimized data retrieval #17

Merged
merged 2 commits into from
Jul 7, 2024

Conversation

anasabbal
Copy link
Owner

  • Added caching to DriverService methods: findAllDrivers and findAllSortedByStatus to improve performance.
  • Introduced cache checks before fetching data from the database.
  • Cached the fetched drivers and sorted drivers with a TTL of 10 minutes.
  • Enhanced logging to trace cache hits and misses.
  • Updated UserController to add logging for better traceability.

Changes include:

  1. DriverService:

    • Injected CACHE_MANAGER for caching.
    • Added caching logic in findAllDrivers and findAllSortedByStatus methods.
    • Enhanced logging to indicate when data is fetched from the cache or database.
    • Ensured sorted drivers are cached in findAllSortedByStatus.
  2. UserController:

    • Added logging to trace incoming commands and errors.
    • Ensured clear logging for successful operations and exceptions.

Anas Abbal and others added 2 commits July 7, 2024 19:42
@anasabbal anasabbal self-assigned this Jul 7, 2024
@anasabbal anasabbal merged commit fe64b89 into master Jul 7, 2024
9 checks passed
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