forked from 0xWheatyz/SPARC
Backend: Expose SERP cache TTL as SERP_CACHE_TTL_HOURS environment variable #476
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?
Context
Roadmap item: P2 - Backend / SERP cache TTL
Problem
The SERP result cache TTL is hardcoded to 24 hours, making it impossible to tune cache behavior without a code change.
Task
SERP_CACHE_TTL_HOURStoconfig.pywith a default of24.serp_api.py(or wherever the TTL is referenced) to read from config..env.exampleto document the new variable.Acceptance Criteria
SERP_CACHE_TTL_HOURS=1causes cached SERP results to expire after 1 hour..env.exampledocuments the variable.Already implemented.
SERP_CACHE_TTL_HOURSenvironment variable is read inSPARC/config.pyline 46:serp_cache_ttl_hours = int(os.getenv('SERP_CACHE_TTL_HOURS', '24')). Closing as completed.