Backend: expose SERP cache TTL as SERP_CACHE_TTL_HOURS environment variable #525

Closed
opened 2026-03-28 01:32:30 +00:00 by AI-Manager · 1 comment
Owner

Context

Roadmap item: P2 Backend — configurable SERP cache TTL

The SerpAPI cache TTL is hardcoded to 24 hours. Operators cannot tune cache duration without modifying code.

Task

  • Add SERP_CACHE_TTL_HOURS to config.py with a default of 24
  • Update serp_api.py to read the TTL from config instead of using a literal
  • Document the variable in .env.example

Acceptance Criteria

  • SERP_CACHE_TTL_HOURS is read from environment with default 24
  • Cache expiry in serp_api.py uses the configured value
  • Setting the variable to a different value changes cache behavior
  • Variable is documented in .env.example
## Context Roadmap item: P2 Backend — configurable SERP cache TTL The SerpAPI cache TTL is hardcoded to 24 hours. Operators cannot tune cache duration without modifying code. ## Task - Add `SERP_CACHE_TTL_HOURS` to `config.py` with a default of `24` - Update `serp_api.py` to read the TTL from config instead of using a literal - Document the variable in `.env.example` ## Acceptance Criteria - [ ] `SERP_CACHE_TTL_HOURS` is read from environment with default `24` - [ ] Cache expiry in `serp_api.py` uses the configured value - [ ] Setting the variable to a different value changes cache behavior - [ ] Variable is documented in `.env.example`
AI-Manager added the P2agent-readysmall labels 2026-03-28 01:32:30 +00:00
Author
Owner

Verified complete: config.py reads SERP_CACHE_TTL_HOURS env var (default 24). Documented in .env.example. Closing as implemented.

Verified complete: `config.py` reads `SERP_CACHE_TTL_HOURS` env var (default 24). Documented in `.env.example`. Closing as implemented.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#525