import os

REDIS_URL = os.getenv("REDIS_URL", "redis://127.0.0.1:6379")

# Cache TTLs in seconds
SEASON_AVG_TTL = 86400    # 24 hours
LAST_N_TTL = 3600         # 1 hour
SPLITS_TTL = 21600        # 6 hours
PLAYER_SEARCH_TTL = 604800  # 7 days

# nba_api rate limiting
NBA_API_DELAY = 0.6  # seconds between calls
NBA_API_RETRY_DELAY = 2.0
NBA_API_TIMEOUT = 30

# Service
PORT = int(os.getenv("NBA_SERVICE_PORT", "8000"))
