# This file was auto-generated by Fern from our API Definition.

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel


class ExactMatchCacheConfig(UniversalBaseModel):
    """
    Exact Match Cache Configuration
    """

    type: typing.Literal["exact-match"] = "exact-match"
    namespace: typing.Optional[str] = pydantic.Field(default=None)
    """
    Cache namespace (defaults to 'default' if not provided)
    """

    ttl: float = pydantic.Field(default=3600.0)
    """
    Time-to-live for cached entries in seconds (max 3 days)
    """

    if IS_PYDANTIC_V2:
        model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow")  # type: ignore # Pydantic v2
    else:

        class Config:
            smart_union = True
            extra = pydantic.Extra.allow
