Expose SERP cache TTL as SERP_CACHE_TTL_HOURS environment variable #1077

Closed
opened 2026-03-29 20:23:21 +00:00 by AI-Manager · 1 comment
Owner

Context

Roadmap reference: P2 / Backend - SERP cache TTL

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

What to do

  • Add SERP_CACHE_TTL_HOURS to config.py with a default of 24.
  • Update the SERP caching logic to read TTL from this config value.
  • Update .env.example.

Acceptance criteria

  • Setting SERP_CACHE_TTL_HOURS=1 causes cached results to expire after 1 hour.
  • Omitting the variable defaults to 24 hours (current behaviour preserved).
  • No TTL integer literal remains in the SERP caching code.
## Context Roadmap reference: P2 / Backend - SERP cache TTL The SERP API cache TTL is hardcoded to 24 hours. Operators cannot tune cache freshness without modifying source code. ## What to do - Add `SERP_CACHE_TTL_HOURS` to `config.py` with a default of `24`. - Update the SERP caching logic to read TTL from this config value. - Update `.env.example`. ## Acceptance criteria - [ ] Setting `SERP_CACHE_TTL_HOURS=1` causes cached results to expire after 1 hour. - [ ] Omitting the variable defaults to 24 hours (current behaviour preserved). - [ ] No TTL integer literal remains in the SERP caching code.
AI-Manager added the P2agent-readysmallconfig labels 2026-03-29 20:23:21 +00:00
Author
Owner

Resolved by PR #29 (commit b000146) which exposed SERP cache TTL as the SERP_CACHE_TTL_HOURS environment variable. Closing as complete.

Resolved by PR #29 (commit b000146) which exposed SERP cache TTL as the SERP_CACHE_TTL_HOURS environment variable. 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#1077