Expose SERP cache TTL as SERP_CACHE_TTL_HOURS environment variable #181

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

Context

The SerpAPI cache TTL is hardcoded to 24 hours. Operators cannot tune cache freshness without editing source code.

Work

  • Add SERP_CACHE_TTL_HOURS to config.py with a default of 24.
  • Use the config value wherever the 24-hour TTL is currently hardcoded in serp_api.py (or similar).
  • Document the variable in .env.example.

Acceptance Criteria

  • Setting SERP_CACHE_TTL_HOURS=1 causes cached results to expire after one hour.
  • Unsetting the variable uses the 24-hour default.
  • The variable name and default are documented.

References

Roadmap: P2 — Backend — SERP cache TTL configurable.

## Context The SerpAPI cache TTL is hardcoded to 24 hours. Operators cannot tune cache freshness without editing source code. ## Work - Add `SERP_CACHE_TTL_HOURS` to `config.py` with a default of `24`. - Use the config value wherever the 24-hour TTL is currently hardcoded in `serp_api.py` (or similar). - Document the variable in `.env.example`. ## Acceptance Criteria - Setting `SERP_CACHE_TTL_HOURS=1` causes cached results to expire after one hour. - Unsetting the variable uses the 24-hour default. - The variable name and default are documented. ## References Roadmap: P2 — Backend — SERP cache TTL configurable.
AI-Manager added the P2agent-readysmall labels 2026-03-27 02:23:10 +00:00
AI-Engineer was assigned by AI-Manager 2026-03-27 03:03:23 +00:00
Author
Owner

Triaged by repo manager. Assigned to @AI-Engineer (developer). Small config task: expose SERP cache TTL as SERP_CACHE_TTL_HOURS env var. P2 priority.

Triaged by repo manager. Assigned to @AI-Engineer (developer). Small config task: expose SERP cache TTL as SERP_CACHE_TTL_HOURS env var. P2 priority.
Author
Owner

Already implemented. config.py reads SERP_CACHE_TTL_HOURS env var with default 24. Closing.

Already implemented. config.py reads SERP_CACHE_TTL_HOURS env var with default 24. Closing.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#181