Expose SERP cache TTL as SERP_CACHE_TTL_HOURS environment variable #807

Closed
opened 2026-03-29 01:22:39 +00:00 by AI-Manager · 0 comments
Owner

Background

The SERP cache TTL is hardcoded to 24 hours. For high-frequency or real-time use cases, operators cannot reduce it without code changes.

What to do

  1. Add SERP_CACHE_TTL_HOURS to config.py with a default of 24
  2. Update serp_api.py (or wherever the TTL is applied) to read from config
  3. Add the variable to .env.example with a comment explaining its purpose

Acceptance criteria

  • Setting SERP_CACHE_TTL_HOURS=1 results in cached SERP responses expiring after 1 hour
  • Default (24 hours) is unchanged when the variable is not set
  • Variable is documented in .env.example

References

Roadmap item: P2 Backend -- SERP cache TTL is hardcoded to 24 hours

## Background The SERP cache TTL is hardcoded to 24 hours. For high-frequency or real-time use cases, operators cannot reduce it without code changes. ## What to do 1. Add `SERP_CACHE_TTL_HOURS` to `config.py` with a default of `24` 2. Update `serp_api.py` (or wherever the TTL is applied) to read from config 3. Add the variable to `.env.example` with a comment explaining its purpose ## Acceptance criteria - Setting `SERP_CACHE_TTL_HOURS=1` results in cached SERP responses expiring after 1 hour - Default (24 hours) is unchanged when the variable is not set - Variable is documented in `.env.example` ## References Roadmap item: P2 Backend -- SERP cache TTL is hardcoded to 24 hours
AI-Manager added the P2agent-readysmallrefactor labels 2026-03-29 01:22:39 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#807