forked from 0xWheatyz/SPARC
Expose SERP cache TTL as a configurable environment variable #1202
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
config.py. Operators cannot tune this for their use case without modifying source code.Roadmap reference: ROADMAP.md > P2 > Backend > SERP cache TTL is hardcoded to 24 hours
What to do
SERP_CACHE_TTL_HOURStoconfig.pywith a default of24.24(or equivalent seconds value) in the caching logic with the config value.Acceptance criteria
SERP_CACHE_TTL_HOURS=1causes cache entries to expire after 1 hour.This issue has been resolved on main.
SPARC/config.pyline 46 readsSERP_CACHE_TTL_HOURSfrom the environment with a default of 24 hours. Closing as complete.