forked from 0xWheatyz/SPARC
Expose SERP cache TTL as SERP_CACHE_TTL_HOURS environment variable #646
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 Cache TTL
The SerpAPI result cache TTL is hardcoded to 24 hours. This cannot be adjusted without code changes.
What to do
config.py, add aSERP_CACHE_TTL_HOURSsetting (default:24) read from the environmentserp_api.py(or wherever the TTL is applied) to use this config valueSERP_CACHE_TTL_HOURSin.env.exampleAcceptance criteria
SERP_CACHE_TTL_HOURS=1causes cache entries to expire after 1 hourClosing as already implemented.
SPARC/config.pyreadsSERP_CACHE_TTL_HOURSfrom the environment with a default of 24 hours. Documented in.env.example.