feat(backend): add redis distributed caching layer (fixes #178)#187
feat(backend): add redis distributed caching layer (fixes #178)#187Diwakar-odds wants to merge 1 commit into
Conversation
|
Hi maintainers, Thank you for assigning this issue to me. I have implemented the Redis caching layer as specified. Technical Analysis
ECSoC26 XP Label RequestBased on the ECSoC '26 Guidelines, this PR falls squarely into the Level 3 (Core/Arch/Perf) category since it involves a core architectural upgrade (adding a distributed caching system) that directly optimizes performance and scalability. Could you please add the |
|
Hi @Mrinalray! 👋 Just following up on this PR to formally request review under the ECSoC '26 program. 🔍 Technical Analysis (L3 Core/Architecture Justification):This PR directly tackles Core Backend Performance Optimization, which strictly satisfies the Level 3 criteria for the ECSoC '26 program:
Since this implements core caching infrastructure and drastically improves backend performance at scale, I kindly request the maintainers to apply the Looking forward to your feedback! 🚀 |
Related Issue
Closes #178
Summary
Introduced a Redis distributed caching layer to cache Google Safe Browsing API responses, significantly reducing external API quotas and latency for redundant scans.
Motivation
Closes #178
Every URL check previously required a full round-trip to the Google Safe Browsing API. Adding a caching layer (Redis) saves processing time, reduces latency, and protects our API quota by directly serving recently scanned results.
Changes Made
server.js:redisclient./checkrequests to fetch cached responses before pinging the external API.package.json&package-lock.json: Addedredis(v4) dependency.README.md: Added setup instructions for the new optionalREDIS_URLenvironment variable.Acceptance Criteria
Impact & Side Effects
Testing
REDIS_URLin.env(e.g.,REDIS_URL=redis://localhost:6379).npm start.example.com). Observe the[SCAN]log.[CACHE HIT] example.comlog instead of a new API call.Checklist