from abc import ABC, abstractmethod
from typing import Optional


class ConfigProvider(ABC):
    @abstractmethod
    def get_configuration(self) -> dict:
        raise NotImplementedError()

    def cache_key(self) -> Optional[str]:
        """Stable identity used as the cache key suffix for this configuration.

        Providers backed by a remote source override this with a deterministic,
        colon-delimited identity (e.g. ``application:environment:profile``).
        Returning ``None`` means the provider is not cacheable and a caching
        decorator must pass through to ``get_configuration`` unchanged.
        """
        return None
