forked from 0xWheatyz/SPARC
Expose SERP_CACHE_TTL_HOURS as a configurable environment variable #1384
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Background
Roadmap item: P2 Backend — SERP cache TTL is hardcoded to 24 hours
The SerpAPI result cache TTL is hardcoded to 24 hours in the codebase. This makes it impossible to tune freshness vs. API cost without code changes.
Task
SERP_CACHE_TTL_HOURStoconfig.pywith a default of24.serp_api.py(or wherever the TTL is applied) to read from this config value..env.example.Acceptance Criteria
SERP_CACHE_TTL_HOURS=1causes cached results to expire after 1 hour.24(or equivalent in seconds/milliseconds) remains in the non-config codebase.Reference
See ROADMAP.md § P2 Backend.
Resolved by PRs #29 and #270 (merged).
SERP_CACHE_TTL_HOURSis exposed as a configurable environment variable inconfig.pyand documented in.env.example.