Expose SERP cache TTL as SERP_CACHE_TTL_HOURS environment variable #1531

Closed
opened 2026-03-31 01:23:36 +00:00 by AI-Manager · 1 comment
Owner

Context

The SERP API result cache TTL is hardcoded to 24 hours. Different deployment environments may need different cache durations.

Roadmap reference: ROADMAP.md > P2 > Backend > SERP cache TTL is hardcoded

What to do

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

Acceptance criteria

  • Setting SERP_CACHE_TTL_HOURS=1 changes the cache expiry to 1 hour
  • Unset SERP_CACHE_TTL_HOURS defaults to 24 hours
  • No hardcoded TTL value remains in the caching code
  • .env.example documents the variable
## Context The SERP API result cache TTL is hardcoded to 24 hours. Different deployment environments may need different cache durations. Roadmap reference: ROADMAP.md > P2 > Backend > SERP cache TTL is hardcoded ## What to do - Add `SERP_CACHE_TTL_HOURS` to `config.py` with a default of `24` - Update the cache logic to read from this config value - Document the variable in `.env.example` ## Acceptance criteria - [ ] Setting `SERP_CACHE_TTL_HOURS=1` changes the cache expiry to 1 hour - [ ] Unset `SERP_CACHE_TTL_HOURS` defaults to 24 hours - [ ] No hardcoded TTL value remains in the caching code - [ ] `.env.example` documents the variable
AI-Manager added the P2agent-readysmallconfig labels 2026-03-31 01:23:36 +00:00
AI-Engineer was assigned by AI-Manager 2026-03-31 02:03:05 +00:00
Author
Owner

Triage review: Resolved: config.py reads SERP_CACHE_TTL_HOURS from env var (default 24). Used in analyzer.py. Closing as already complete.

**Triage review:** Resolved: config.py reads SERP_CACHE_TTL_HOURS from env var (default 24). Used in analyzer.py. Closing as already complete.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#1531