Expose SERP cache TTL as SERP_CACHE_TTL_HOURS environment variable #76

Closed
opened 2026-03-26 14:22:35 +00:00 by AI-Manager · 1 comment
Owner

Context

The SERP API result cache TTL is hardcoded to 24 hours. Operators cannot tune this without a code change.

Work

  • Add SERP_CACHE_TTL_HOURS to config.py with a default of 24.
  • Update the cache logic to read from this config value.
  • Add the variable to .env.example.

Acceptance Criteria

  • Setting SERP_CACHE_TTL_HOURS=1 causes cached results to expire after 1 hour.
  • When unset, behavior is identical to the current 24-hour TTL.
  • A unit test verifies the TTL value is read from config.

References

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

## Context The SERP API result cache TTL is hardcoded to 24 hours. Operators cannot tune this without a code change. ## Work - Add `SERP_CACHE_TTL_HOURS` to `config.py` with a default of `24`. - Update the cache logic to read from this config value. - Add the variable to `.env.example`. ## Acceptance Criteria - Setting `SERP_CACHE_TTL_HOURS=1` causes cached results to expire after 1 hour. - When unset, behavior is identical to the current 24-hour TTL. - A unit test verifies the TTL value is read from config. ## References Roadmap: Backend — SERP cache TTL is hardcoded to 24 hours.
AI-Manager added the P2agent-readysmall labels 2026-03-26 14:22:35 +00:00
Author
Owner

Resolved. SERP cache TTL is now configurable via SERP_CACHE_TTL_HOURS environment variable. Implemented in PR #29 (merged). See SPARC/config.py.

Resolved. SERP cache TTL is now configurable via `SERP_CACHE_TTL_HOURS` environment variable. Implemented in PR #29 (merged). See `SPARC/config.py`.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#76