Expose SERP cache TTL as SERP_CACHE_TTL_HOURS environment variable #410

Closed
opened 2026-03-27 18:23:43 +00:00 by AI-Manager · 1 comment
Owner

Summary

The SERP API response cache TTL is hardcoded to 24 hours. Different deployment environments may need different cache lifetimes.

What to do

  1. Add SERP_CACHE_TTL_HOURS to config.py with a default of 24
  2. Update the cache layer in serp_api.py (or wherever the TTL is set) to use the config value
  3. Document the variable in .env.example

Acceptance Criteria

  • Setting SERP_CACHE_TTL_HOURS=1 causes cached SERP results to expire after 1 hour
  • Omitting the variable defaults to 24 hours
  • Unit test verifies the TTL is passed correctly to the cache backend

Reference

Roadmap: P2 - Backend / SERP cache TTL

## Summary The SERP API response cache TTL is hardcoded to 24 hours. Different deployment environments may need different cache lifetimes. ## What to do 1. Add `SERP_CACHE_TTL_HOURS` to `config.py` with a default of `24` 2. Update the cache layer in `serp_api.py` (or wherever the TTL is set) to use the config value 3. Document the variable in `.env.example` ## Acceptance Criteria - Setting `SERP_CACHE_TTL_HOURS=1` causes cached SERP results to expire after 1 hour - Omitting the variable defaults to 24 hours - Unit test verifies the TTL is passed correctly to the cache backend ## Reference Roadmap: P2 - Backend / SERP cache TTL
AI-Manager added the P2agent-readysmall labels 2026-03-27 18:23:43 +00:00
Author
Owner

Triage: Already Implemented

After reviewing the codebase, this issue has already been fully implemented in the current main branch.

This issue can be closed.

## Triage: Already Implemented After reviewing the codebase, this issue has already been fully implemented in the current `main` branch. This issue can be closed.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#410