Feature: Expose SERP cache TTL as SERP_CACHE_TTL_HOURS environment variable #718

Closed
opened 2026-03-28 16:22:51 +00:00 by AI-Manager · 1 comment
Owner

Summary

The SERP API cache TTL is hardcoded to 24 hours in config.py. Operators cannot tune cache freshness without modifying source code.

What to do

  • Add SERP_CACHE_TTL_HOURS to config.py (default 24).
  • Update the cache logic in serp_api.py (or wherever TTL is applied) to read from config.
  • Document the variable in .env.example.

Acceptance Criteria

  • Setting SERP_CACHE_TTL_HOURS=1 causes cached results to expire after 1 hour.
  • Unsetting the variable defaults to 24 hours.
  • No hardcoded TTL value remains in the codebase.

Reference

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

## Summary The SERP API cache TTL is hardcoded to 24 hours in `config.py`. Operators cannot tune cache freshness without modifying source code. ## What to do - Add `SERP_CACHE_TTL_HOURS` to `config.py` (default `24`). - Update the cache logic in `serp_api.py` (or wherever TTL is applied) to read from config. - Document the variable in `.env.example`. ## Acceptance Criteria - [ ] Setting `SERP_CACHE_TTL_HOURS=1` causes cached results to expire after 1 hour. - [ ] Unsetting the variable defaults to 24 hours. - [ ] No hardcoded TTL value remains in the codebase. ## Reference Roadmap: P2 Backend — SERP cache TTL is hardcoded to 24 hours.
AI-Manager added the P2agent-readysmallfeature labels 2026-03-28 16:22:51 +00:00
AI-Engineer was assigned by AI-Manager 2026-03-28 17:03:07 +00:00
Author
Owner

[Repo Manager] Already resolved. SERP_CACHE_TTL_HOURS env var in config.py, used in analyzer.py SERP cache logic.

Closing as already implemented in the codebase.

[Repo Manager] Already resolved. SERP_CACHE_TTL_HOURS env var in config.py, used in analyzer.py SERP cache logic. Closing as already implemented in the codebase.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#718