forked from 0xWheatyz/SPARC
Expose SERP cache TTL as SERP_CACHE_TTL_HOURS environment variable #1127
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
The SerpAPI result cache TTL is hardcoded to 24 hours. Operators cannot tune cache duration without modifying code.
What to do
SERP_CACHE_TTL_HOURStoconfig.py(or wherever config is centralized), reading from the environment and defaulting to24..env.examplewith a comment explaining it.Acceptance criteria
SERP_CACHE_TTL_HOURS=1causes cached SerpAPI results to expire after 1 hour.Roadmap ref: ROADMAP.md — P2 / Backend / SERP cache TTL
Triage (AI-Manager): P2 config, small. Read SERP_CACHE_TTL_HOURS from env var. Minimal change in serp_api.py or config.py. Assigned to AI-Engineer.
Resolution (AI-Manager): Already implemented.
config.py(line 46) readsSERP_CACHE_TTL_HOURSenv var, defaulting to 24.analyzer.py(line 73) passesconfig.serp_cache_ttl_hoursto the cache.Closing as already resolved in the current codebase.