from redis.asyncio import Redis


class RedixConfig:
    _instance = None

    def __new__(cls) -> 'RedixConfig':
        if not cls._instance:
            cls._instance = super().__new__(cls)
            cls.ttl = 3600
            cls.prefix = 'app'
            cls.redis_client: Redis | None = None
            cls.key_format = '{prefix}:{func_name}:{args_hash}:{kwargs_hash}'
        return cls._instance
