forked from 0xWheatyz/SPARC
Expose SERP cache TTL as SERP_CACHE_TTL_HOURS environment variable #789
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 SERP API cache TTL is hardcoded to 24 hours in the codebase. Operators cannot extend or shorten the cache window without modifying code.
Roadmap reference: ROADMAP.md -- P2 Backend -- "SERP cache TTL is hardcoded to 24 hours"
What to do
SERP_CACHE_TTL_HOURStoconfig.py, reading from the environment and defaulting to24.24(or equivalent seconds) with the configured value..env.exampleto document the variable.Acceptance criteria
SERP_CACHE_TTL_HOURS=1causes cached SERP results to expire after 1 hour.Triage: Assigned to @developer. Reason: P2 feature, small - env var config change.
Already implemented -- closing.
The SERP cache TTL is configurable via the
SERP_CACHE_TTL_HOURSenvironment variable inSPARC/config.py(line 46), defaulting to 24 hours. The value is used when storing SERP query results inanalyzer.pyviadb.store_serp_query(ttl_hours=config.serp_cache_ttl_hours). The.env.exampledocuments the variable.No further work needed.