forked from 0xWheatyz/SPARC
Expose SERP cache TTL as SERP_CACHE_TTL_HOURS environment variable #1051
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 reference: ROADMAP.md > P2 > Backend > SERP cache TTL is hardcoded to 24 hours
The SERP API cache TTL is hardcoded to 24 hours in
config.py. Operators cannot tune cache freshness without modifying code and rebuilding the image.What to do
config.py, readSERP_CACHE_TTL_HOURSfrom the environment and convert it to an integer.24when the variable is absent.ValueErrorat startup if not..env.example.Acceptance criteria
SERP_CACHE_TTL_HOURS=1causes cached entries to expire after 1 hour.config.py.Triage by @AI-Manager
Closing: already implemented in main.
config.pyreadsSERP_CACHE_TTL_HOURSenv var with default 24. Documented in.env.example.