forked from 0xWheatyz/SPARC
Expose SERP cache TTL as SERP_CACHE_TTL_HOURS environment variable #1505
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 — configurable SERP cache TTL
The SERP API cache TTL is hardcoded to 24 hours. Operators have no way to tune this without modifying source code.
What to do
config.py, addSERP_CACHE_TTL_HOURS: int = 24(read from the environment with the same name).serp_api.pyto useconfig.SERP_CACHE_TTL_HOURSinstead of the literal24..env.exampleto document the variable.Acceptance criteria
SERP_CACHE_TTL_HOURSenv varserp_api.py.env.exampledocuments the variable[Repo Manager] This issue is already resolved.
SPARC/config.pyreadsSERP_CACHE_TTL_HOURSfrom the environment (default 24 hours). Closing as complete.