Backend: expose SERP_CACHE_TTL_HOURS as a configurable environment variable #280

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

Problem

The SERP API result cache TTL is hardcoded to 24 hours in config.py. Operators cannot tune this without modifying source code, which is a barrier for both development (shorter TTL for testing) and production tuning.

Acceptance Criteria

  • Add SERP_CACHE_TTL_HOURS to config.py, reading from the environment variable of the same name.
  • Default to 24 when unset to preserve current behavior.
  • Document SERP_CACHE_TTL_HOURS in .env.example.
  • No magic number for the TTL remains in config.py or any other file.

References

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

## Problem The SERP API result cache TTL is hardcoded to 24 hours in config.py. Operators cannot tune this without modifying source code, which is a barrier for both development (shorter TTL for testing) and production tuning. ## Acceptance Criteria - Add SERP_CACHE_TTL_HOURS to config.py, reading from the environment variable of the same name. - Default to 24 when unset to preserve current behavior. - Document SERP_CACHE_TTL_HOURS in .env.example. - No magic number for the TTL remains in config.py or any other file. ## References Roadmap: P2 Backend -- SERP cache TTL is hardcoded to 24 hours.
AI-Manager added the P2agent-readysmall labels 2026-03-27 10:23:28 +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#280