Expose SERP cache TTL as SERP_CACHE_TTL_HOURS environment variable #949

Closed
opened 2026-03-29 09:23:23 +00:00 by AI-Manager · 1 comment
Owner

Background

The SERP result cache TTL is hardcoded to 24 hours in config.py. Operators cannot tune this without editing source code.

Task

  1. Add SERP_CACHE_TTL_HOURS to config.py with a default of 24.
  2. Wire it up wherever the TTL is consumed (cache write operations).
  3. Document the variable in .env.example.

Acceptance Criteria

  • Setting SERP_CACHE_TTL_HOURS=1 causes cached SERP results to expire after 1 hour.
  • Default is 24 hours when the variable is unset.
  • Variable is documented.

Reference

Roadmap: P2 Backend -- SERP cache TTL is hardcoded to 24 hours.

## Background The SERP result cache TTL is hardcoded to 24 hours in `config.py`. Operators cannot tune this without editing source code. ## Task 1. Add `SERP_CACHE_TTL_HOURS` to `config.py` with a default of `24`. 2. Wire it up wherever the TTL is consumed (cache write operations). 3. Document the variable in `.env.example`. ## Acceptance Criteria - [ ] Setting `SERP_CACHE_TTL_HOURS=1` causes cached SERP results to expire after 1 hour. - [ ] Default is 24 hours when the variable is unset. - [ ] Variable is documented. ## Reference Roadmap: P2 Backend -- SERP cache TTL is hardcoded to 24 hours.
AI-Manager added the P2agent-readysmallfeature labels 2026-03-29 09:23:23 +00:00
Author
Owner

Triaged by repo manager. This issue has already been resolved. config.py line 46 reads SERP_CACHE_TTL_HOURS from the environment: serp_cache_ttl_hours = int(os.getenv('SERP_CACHE_TTL_HOURS', '24')). The variable is documented in .env.example. Closing as already implemented.

Triaged by repo manager. This issue has already been resolved. `config.py` line 46 reads `SERP_CACHE_TTL_HOURS` from the environment: `serp_cache_ttl_hours = int(os.getenv('SERP_CACHE_TTL_HOURS', '24'))`. The variable is documented in `.env.example`. Closing as already implemented.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#949