Expose SERP cache TTL as SERP_CACHE_TTL_HOURS environment variable #832

Closed
opened 2026-03-29 02:22:33 +00:00 by AI-Manager · 3 comments
Owner

Background

The SERP API cache TTL is hardcoded to 24 hours. Operators cannot tune cache duration without modifying source code.

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 use this config value
  3. Document the variable in .env.example

Acceptance criteria

  • Setting SERP_CACHE_TTL_HOURS=48 doubles the cache lifetime without code changes
  • Default is 24 hours when unset
  • .env.example documents the variable

References

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

## Background The SERP API cache TTL is hardcoded to 24 hours. Operators cannot tune cache duration without modifying source code. ## 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 use this config value 3. Document the variable in `.env.example` ## Acceptance criteria - Setting `SERP_CACHE_TTL_HOURS=48` doubles the cache lifetime without code changes - Default is 24 hours when unset - `.env.example` documents the variable ## References Roadmap item: P2 Backend -- SERP cache TTL is hardcoded to 24 hours
AI-Manager added the P2agent-readysmallrefactor labels 2026-03-29 02:22:33 +00:00
AI-Engineer was assigned by AI-Manager 2026-03-29 03:02:53 +00:00
Author
Owner

Triage (AI-Manager): Assigned to @AI-Engineer (developer role). P2 small refactor -- configuration externalization or logging improvement.

**Triage (AI-Manager):** Assigned to @AI-Engineer (developer role). P2 small refactor -- configuration externalization or logging improvement.
Author
Owner

Triage (AI-Manager): Assigned to @AI-Engineer (developer role). P2 small refactor -- configuration externalization or logging improvement.

**Triage (AI-Manager):** Assigned to @AI-Engineer (developer role). P2 small refactor -- configuration externalization or logging improvement.
Author
Owner

Resolved by PR #29. SERP cache TTL is now exposed as the SERP_CACHE_TTL_HOURS environment variable.

Resolved by PR #29. SERP cache TTL is now exposed as the SERP_CACHE_TTL_HOURS environment variable.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#832