emoss08 / Trenova

An Open Source AI-driven asset based transportation management system
http://trenova.app
Other
24 stars 5 forks source link

🟡(change): cache organization response #275

Closed emoss08 closed 1 month ago

emoss08 commented 1 month ago

Organization is pulled quite a bit from the application, but should not be updated often.

Summary by Sourcery

This pull request introduces caching for organization data using Redis, removes the rainbow animation feature from the theme provider, and consolidates organization-related API endpoints and hooks. Additionally, it updates dependencies to include the Redis client library.

sourcery-ai[bot] commented 1 month ago

Reviewer's Guide by Sourcery

This pull request introduces caching for organization data using Redis, refactors organization-related hooks and services, and removes the rainbow animation feature from the frontend components. Key changes include adding Redis client initialization, implementing caching logic in the OrganizationService, and updating various frontend components to use the new organization hooks.

File-Level Changes

Files Changes
internal/api/services/organization.service.go
internal/api/handlers/organization.handler.go
internal/server/server.go
pkg/redis/client.go
config/server_config.go
Implemented caching for organization data using Redis, including initialization and cache invalidation logic.
web/frontend/src/components/ui/theme-provider.tsx
web/frontend/src/components/layout/user-avatar-menu.tsx
web/frontend/src/components/layout/topbar.tsx
Removed rainbow animation feature from the frontend components.
web/frontend/src/hooks/useQueries.ts
web/frontend/src/services/OrganizationRequestService.ts
web/frontend/src/components/layout/logo.tsx
web/frontend/src/pages/admin/Dashboard.tsx
Refactored organization-related hooks and services to use a unified endpoint and naming convention.

Tips - Trigger a new Sourcery review by commenting `@sourcery-ai review` on the pull request. - Continue your discussion with Sourcery by replying directly to review comments. - You can change your review settings at any time by accessing your [dashboard](https://app.sourcery.ai): - Enable or disable the Sourcery-generated pull request summary or reviewer's guide; - Change the review language; - You can always [contact us](mailto:support@sourcery.ai) if you have any questions or feedback.