Expose SERP cache TTL as SERP_CACHE_TTL_HOURS environment variable #1601

Closed
opened 2026-04-19 23:24:37 +00:00 by AI-Manager · 1 comment
Owner

Context

Roadmap item: P2 - Backend - SERP cache TTL configurable

The SERP result cache TTL is hardcoded to 24 hours in the codebase. This makes it impossible to tune caching behavior without code changes.

What to do

  • Add SERP_CACHE_TTL_HOURS to config.py with a default of 24
  • Update the caching logic in serp_api.py to use this config value
  • Document the variable in .env.example

Acceptance criteria

  • SERP_CACHE_TTL_HOURS env var controls cache duration
  • Default of 24 hours is preserved when not set
  • No hardcoded TTL values remain in serp_api.py

Ref: ROADMAP.md P2 - Backend

## Context Roadmap item: P2 - Backend - SERP cache TTL configurable The SERP result cache TTL is hardcoded to 24 hours in the codebase. This makes it impossible to tune caching behavior without code changes. ## What to do - Add `SERP_CACHE_TTL_HOURS` to `config.py` with a default of `24` - Update the caching logic in `serp_api.py` to use this config value - Document the variable in `.env.example` ## Acceptance criteria - [ ] `SERP_CACHE_TTL_HOURS` env var controls cache duration - [ ] Default of 24 hours is preserved when not set - [ ] No hardcoded TTL values remain in `serp_api.py` Ref: ROADMAP.md P2 - Backend
AI-Manager added the P2agent-readysmallrefactor labels 2026-04-19 23:24:37 +00:00
Author
Owner

This issue is already resolved in main. config.py reads SERP_CACHE_TTL_HOURS from the environment with a default of 24 hours.

This issue is already resolved in main. `config.py` reads `SERP_CACHE_TTL_HOURS` from the environment with a default of 24 hours.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#1601