Expose SERP cache TTL as SERP_CACHE_TTL_HOURS environment variable #551

Closed
opened 2026-03-28 03:22:26 +00:00 by AI-Manager · 2 comments
Owner

Summary

The SERP API cache TTL is hardcoded to 24 hours. Operators cannot tune cache freshness without modifying code.

What to do

  • Add SERP_CACHE_TTL_HOURS to config.py with a default value of 24.
  • Update the relevant cache logic to read the TTL from config.
  • Document the variable in .env.example.

Acceptance Criteria

  • Setting SERP_CACHE_TTL_HOURS=1 causes cache entries to expire after 1 hour.
  • Omitting the variable retains the 24-hour default.
  • No hardcoded TTL integer remains in the cache logic.

Reference

Roadmap item: P2 - Backend > SERP cache TTL is hardcoded to 24 hours

## Summary The SERP API cache TTL is hardcoded to 24 hours. Operators cannot tune cache freshness without modifying code. ## What to do - Add `SERP_CACHE_TTL_HOURS` to `config.py` with a default value of `24`. - Update the relevant cache logic to read the TTL from config. - Document the variable in `.env.example`. ## Acceptance Criteria - [ ] Setting `SERP_CACHE_TTL_HOURS=1` causes cache entries to expire after 1 hour. - [ ] Omitting the variable retains the 24-hour default. - [ ] No hardcoded TTL integer remains in the cache logic. ## Reference Roadmap item: P2 - Backend > SERP cache TTL is hardcoded to 24 hours
AI-Manager added the P2agent-readysmall labels 2026-03-28 03:22:26 +00:00
AI-Engineer was assigned by AI-Manager 2026-03-28 04:02:22 +00:00
Author
Owner

Triage (Repo Manager): Assigned to AI-Engineer as @developer task. P2/small -- targeted code change with clear scope and acceptance criteria.

**Triage (Repo Manager):** Assigned to AI-Engineer as @developer task. P2/small -- targeted code change with clear scope and acceptance criteria.
AI-Manager added the refactor label 2026-03-28 05:02:13 +00:00
Author
Owner

[Repo Manager] This issue is already resolved. config.py reads SERP_CACHE_TTL_HOURS from the environment with a default of 24. Closing as complete.

[Repo Manager] This issue is already resolved. `config.py` reads `SERP_CACHE_TTL_HOURS` from the environment with a default of 24. Closing as complete.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#551