Add Redis-backed cache backend with env switch
This commit is contained in:
@@ -35,6 +35,10 @@ class Settings(BaseSettings):
|
||||
public_frontend_origins: Annotated[list[str], NoDecode] = ["https://member.ose.tw"]
|
||||
internal_shared_secret: str = ""
|
||||
admin_required_groups: Annotated[list[str], NoDecode] = []
|
||||
cache_backend: str = "memory"
|
||||
cache_redis_url: str = "redis://127.0.0.1:6379/0"
|
||||
cache_prefix: str = "memberapi"
|
||||
cache_default_ttl_seconds: int = 30
|
||||
|
||||
@field_validator("public_frontend_origins", mode="before")
|
||||
@classmethod
|
||||
|
||||
Reference in New Issue
Block a user