from pydantic import BaseSettings, RedisDsn class CacheSettings(BaseSettings): """Cache settings.""" url: RedisDsn class Config: """Settings configuration.""" env_prefix = "cache_" env_file = ".env" env_file_encoding = "utf-8"