Skip to content

added redis caching#483

Open
Nabeelahh wants to merge 2 commits into
dev-fatima-24:mainfrom
Nabeelahh:feat/add-redis-caching
Open

added redis caching#483
Nabeelahh wants to merge 2 commits into
dev-fatima-24:mainfrom
Nabeelahh:feat/add-redis-caching

Conversation

@Nabeelahh
Copy link
Copy Markdown

closes #333

Description

This PR adds Redis caching for project detail pages to improve performance and reduce load on upstream data sources. Project details are frequently accessed via the public audit explorer and aggregate data from multiple sources. Responses are now cached with a 60-second TTL. Cache invalidation is triggered automatically when a project's status changes (e.g., verified, suspended). Cache misses are logged for monitoring purposes, and cached responses include an appropriate Cache-Control header.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • DevOps / Infrastructure change
  • Dependency update

Testing Done

Describe the tests you ran and how to reproduce them:

  • Unit tests pass
  • Integration tests pass
  • E2E tests pass (if applicable)
  • Manual testing completed

Manual testing steps:

  1. Request a project detail endpoint (e.g., /api/projects/{id}) — first request returns from source
  2. Request the same endpoint within 60 seconds — response served from Redis cache
  3. Update project status (verified → suspended) — cache invalidation triggered
  4. Request endpoint again — cache miss logged, fresh data fetched and recached
  5. Verify Cache-Control: max-age=60 header is present in response

Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests passed locally with my changes
  • Any dependent changes have been merged and published
  • If I added a new top-level directory, I have updated docs/folder-structure.md and the README "Project Structure" section to include it

@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented Jun 1, 2026

@Nabeelahh Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

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.

[BACKEND] Add Redis caching for project detail responses

1 participant