-
Couldn't load subscription status.
- Fork 190
Open
Description
Implement API Caching for Read-Heavy Endpoints
Description
Repeated requests to static data endpoints (FAQs, help topics) cause unnecessary database load. Frequent API calls for static data can be optimized using caching.
Solution
Use Redis or an in-memory cache for frequently accessed endpoints.
Affected Endpoints
GET /api/v1/faqs
GET /api/v1/help-center/topics
Tasks
- Identify read-heavy endpoints (e.g.,
/api/v1/faqs,/api/v1/help-center/topics). - Implement caching using Redis or an in-memory store.
- Set cache expiration rules to prevent stale data.
- Write tests to ensure cache efficiency.
Acceptance Criteria
- Cached responses reduce load on the database.
- Expired cache data is refreshed correctly.
- Tests validate cache functionality.