(self, region_name: str, app_identifier: Optional[str] = None, ttl_days: Optional[int] = None,)
:param region_name: name of AWS region to use instead of the default.
        :param app_identifier: prefix for all application metric names.
            Required from client applications to avoid name collisions.
        :param ttl_days: number of days after which data written by this client should expire.
            Use -1 if data should never expire, and leave as None to use the default value.
:param region_name: name of AWS region to use instead of the default.
        :param app_identifier: prefix for all application metric names.
            Required from client applications to avoid name collisions.
        :param ttl_days: number of days after which data written by this client should expire.
            Use -1 if data should never expire, and leave as None to use the default value.
: param region_name : name of AWS region to use instead of the default . : param app_identifier : prefix for all application metric names . Required from client applications to avoid name collisions . : param ttl_days : number of days after which data written by this client should expire . Use - 1 if data should never expire and leave as None to use the default value .
def __init__(self, region_name: str, app_identifier: Optional[str] = None, ttl_days: Optional[int] = None,) -> None:
        """
        :param region_name: name of AWS region to use instead of the default.
        :param app_identifier: prefix for all application metric names.
            Required from client applications to avoid name collisions.
        :param ttl_days: number of days after which data written by this client should expire.
            Use -1 if data should never expire, and leave as None to use the default value.
        """
        self.region_name = region_name
        ttl_days = ttl_days or staticconf.read_int("dynamodb.ttl_days", namespace=CONFIG_NAMESPACE)

        self.ddb = get_metrics_session().resource("dynamodb", region_name=self.region_name,)
        self.app_identifier = app_identifier
        if ttl_days == -1:
            # Never expire
            self.ttl_seconds = None
        else:
            self.ttl_seconds = int(timedelta(days=ttl_days).total_seconds())

        self._cache: MutableMapping[str, CacheEntry] = defaultdict(CacheEntry)
def __init__ ( self , region_name : str , app_identifier : Optional [ str ] = None , ttl_days : Optional [ int ] = None , ) -> None : self . region_name = region_name ttl_days = ttl_days or staticconf . read_int ( "dynamodb.ttl_days" , namespace = CONFIG_NAMESPACE ) self . ddb = get_metrics_session ( ) . resource ( "dynamodb" , region_name = self . region_name , ) self . app_identifier = app_identifier if ttl_days == - 1 : # Never expire self . ttl_seconds = None else : self . ttl_seconds = int ( timedelta ( days = ttl_days ) . total_seconds ( ) ) self . _cache : MutableMapping [ str , CacheEntry ] = defaultdict ( CacheEntry )