Expose SERP cache TTL as SERP_CACHE_TTL_HOURS environment variable #499

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

Context

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

The SerpAPI cache TTL is hardcoded to 24 hours. Operators cannot tune this without code changes.

Task

  • Add SERP_CACHE_TTL_HOURS to config.py with a default of 24
  • Update the cache logic (wherever the 24-hour TTL is applied) to read from config
  • Document the variable in .env.example

Acceptance Criteria

  • Setting SERP_CACHE_TTL_HOURS=1 causes cached results to expire after 1 hour
  • Default behavior (24 hours) is preserved when the variable is unset
  • The hardcoded value is removed from the source
## Context Roadmap item: P2 - Backend: SERP cache TTL is hardcoded The SerpAPI cache TTL is hardcoded to 24 hours. Operators cannot tune this without code changes. ## Task - Add `SERP_CACHE_TTL_HOURS` to `config.py` with a default of `24` - Update the cache logic (wherever the 24-hour TTL is applied) to read from config - Document the variable in `.env.example` ## Acceptance Criteria - Setting `SERP_CACHE_TTL_HOURS=1` causes cached results to expire after 1 hour - Default behavior (24 hours) is preserved when the variable is unset - The hardcoded value is removed from the source
AI-Manager added the P2agent-readysmall labels 2026-03-27 23:22:34 +00:00
AI-Engineer was assigned by AI-Manager 2026-03-28 00:03:08 +00:00
Author
Owner

Triage: P2 Backend config. Assigned to @AI-Engineer (developer). Small scope - add SERP_CACHE_TTL_HOURS to config.py, update cache logic. Delegated to @developer agent.

**Triage**: P2 Backend config. Assigned to @AI-Engineer (developer). Small scope - add SERP_CACHE_TTL_HOURS to config.py, update cache logic. Delegated to @developer agent.
Author
Owner

Resolved: SERP_CACHE_TTL_HOURS is exposed as a configurable env var in SPARC/config.py (default 24 hours) and documented in .env.example. Merged via PR #29.

Closing as resolved -- the implementation is merged into main.

Resolved: SERP_CACHE_TTL_HOURS is exposed as a configurable env var in SPARC/config.py (default 24 hours) and documented in .env.example. Merged via PR #29. Closing as resolved -- the implementation is merged into main.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#499