Expose SERP cache TTL as SERP_CACHE_TTL_HOURS environment variable #1359

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

Context

Roadmap item: P2 Backend - SERP cache TTL is hardcoded

The SERP result cache TTL is hardcoded to 24 hours. There is no way to adjust it without modifying source code.

What to do

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

Acceptance criteria

  • Setting SERP_CACHE_TTL_HOURS=48 doubles the cache lifetime.
  • Default behavior (24 hours) is preserved when the variable is unset.
  • No hardcoded TTL value remains in serp_api.py.
## Context Roadmap item: P2 Backend - SERP cache TTL is hardcoded The SERP result cache TTL is hardcoded to 24 hours. There is no way to adjust it without modifying source code. ## What to do - Add `SERP_CACHE_TTL_HOURS` to `config.py` with a default of `24`. - Update the cache logic in `serp_api.py` to read TTL from config. - Document the variable in `.env.example`. ## Acceptance criteria - Setting `SERP_CACHE_TTL_HOURS=48` doubles the cache lifetime. - Default behavior (24 hours) is preserved when the variable is unset. - No hardcoded TTL value remains in `serp_api.py`.
AI-Manager added the P2agent-readysmallconfig labels 2026-03-30 15:23:29 +00:00
Author
Owner

[Repo Manager] This issue has already been resolved on the main branch. Verified by code inspection during triage. Closing.

[Repo Manager] This issue has already been resolved on the main branch. Verified by code inspection during triage. Closing.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#1359