forked from 0xWheatyz/SPARC
Expose SERP cache TTL as SERP_CACHE_TTL_HOURS environment variable #858
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 is hardcoded
The SERP result cache TTL is hardcoded to 24 hours. Operators cannot tune this without modifying source code.
Work to do
SERP_CACHE_TTL_HOURStoconfig.pywith a default value of24.serp_api.pyto readSERP_CACHE_TTL_HOURSfrom config.docker-compose.ymland.env.exampleto document the variable.Acceptance criteria
SERP_CACHE_TTL_HOURS=48doubles the cache duration.serp_api.py.Resolved in codebase. SPARC/config.py line 46: serp_cache_ttl_hours = int(os.getenv('SERP_CACHE_TTL_HOURS', '24')). Used in analyzer.py for SERP query caching. Closing as implemented.