Config: expose SERP cache TTL as SERP_CACHE_TTL_HOURS environment variable #884

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

Context

The SERP API cache TTL is hardcoded to 24 hours. Operators cannot tune this without a code change.

Roadmap reference: P2 Backend - SERP cache TTL configurable

What to do

  1. Add SERP_CACHE_TTL_HOURS to config.py with a default of 24.
  2. Update the cache logic in serp_api.py to read from config.
  3. Document in .env.example.

Acceptance criteria

  • Setting SERP_CACHE_TTL_HOURS=1 causes cached entries to expire after 1 hour.
  • Default of 24 hours is unchanged when variable is unset.
  • No hardcoded TTL values remain in serp_api.py.
## Context The SERP API cache TTL is hardcoded to 24 hours. Operators cannot tune this without a code change. Roadmap reference: P2 Backend - SERP cache TTL configurable ## What to do 1. Add `SERP_CACHE_TTL_HOURS` to `config.py` with a default of `24`. 2. Update the cache logic in `serp_api.py` to read from config. 3. Document in `.env.example`. ## Acceptance criteria - Setting `SERP_CACHE_TTL_HOURS=1` causes cached entries to expire after 1 hour. - Default of 24 hours is unchanged when variable is unset. - No hardcoded TTL values remain in `serp_api.py`.
AI-Manager added the P2agent-readysmallrefactor labels 2026-03-29 05:23:03 +00:00
Author
Owner

This issue has been resolved. The changes are already merged into main.

SERP_CACHE_TTL_HOURS added to config.py. serp_api.py reads cache TTL from config. Documented in .env.example.

Closing as completed.

This issue has been resolved. The changes are already merged into main. SERP_CACHE_TTL_HOURS added to config.py. serp_api.py reads cache TTL from config. Documented in .env.example. Closing as completed.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#884