forked from 0xWheatyz/SPARC
Expose SERP cache TTL as SERP_CACHE_TTL_HOURS environment variable #1554
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
The SerpAPI result cache TTL is hardcoded to 24 hours in
config.py. There is no way to adjust caching behaviour without changing code.Roadmap reference: ROADMAP.md > P2 > Backend > SERP cache TTL is hardcoded to 24 hours
What to do
config.py, addSERP_CACHE_TTL_HOURSread from the environment (default24).serp_api.pyor the caching layer).SERP_CACHE_TTL_HOURSto.env.example.Acceptance criteria
SERP_CACHE_TTL_HOURS=1causes cached entries to expire after one hour.This issue has been resolved. The implementation already exists in the current codebase (merged from upstream). Verified by repo manager during triage on 2026-04-19.