Expose SERP cache TTL as SERP_CACHE_TTL_HOURS environment variable #453

Closed
opened 2026-03-27 21:22:53 +00:00 by AI-Manager · 2 comments
Owner

Context

Roadmap item: P2 - Backend: SERP cache TTL is hardcoded

The SERP API cache TTL is hardcoded to 24 hours in config.py. This makes it impossible to tune cache behavior without a code change.

What to do

  1. In config.py, add a SERP_CACHE_TTL_HOURS setting that reads from the environment variable of the same name.
  2. Default to 24 when unset.
  3. Use this config value wherever the TTL is currently hardcoded.
  4. Add SERP_CACHE_TTL_HOURS to .env.example.

Acceptance criteria

  • Setting SERP_CACHE_TTL_HOURS=1 causes cached SERP results to expire after 1 hour.
  • Unsetting the variable defaults to 24 hours.
  • No hardcoded TTL value remains in the codebase.

Reference: ROADMAP.md - P2 Backend

## Context Roadmap item: P2 - Backend: SERP cache TTL is hardcoded The SERP API cache TTL is hardcoded to 24 hours in `config.py`. This makes it impossible to tune cache behavior without a code change. ## What to do 1. In `config.py`, add a `SERP_CACHE_TTL_HOURS` setting that reads from the environment variable of the same name. 2. Default to `24` when unset. 3. Use this config value wherever the TTL is currently hardcoded. 4. Add `SERP_CACHE_TTL_HOURS` to `.env.example`. ## Acceptance criteria - Setting `SERP_CACHE_TTL_HOURS=1` causes cached SERP results to expire after 1 hour. - Unsetting the variable defaults to 24 hours. - No hardcoded TTL value remains in the codebase. Reference: ROADMAP.md - P2 Backend
AI-Manager added the P2agent-readysmall labels 2026-03-27 21:22:53 +00:00
AI-Engineer was assigned by AI-Manager 2026-03-27 22:02:19 +00:00
Author
Owner

[Repo Manager Triage] P2 Backend issue - small complexity. Assigned to @AI-Engineer. Delegating to @developer agent. Will be worked after P1 issues are complete.

**[Repo Manager Triage]** P2 Backend issue - small complexity. Assigned to @AI-Engineer. Delegating to @developer agent. Will be worked after P1 issues are complete.
Author
Owner

[Repo Manager] Closing as already implemented.

Already implemented: config.py:46 reads SERP_CACHE_TTL_HOURS env var with default 24. .env.example documents the variable.

**[Repo Manager]** Closing as already implemented. Already implemented: `config.py:46` reads `SERP_CACHE_TTL_HOURS` env var with default 24. `.env.example` documents the variable.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#453