in src/aws_secretsmanager_caching/secret_cache.py [0:0]
def __init__(self, config=SecretCacheConfig(), client=None):
"""Construct a secret cache using the given configuration and
AWS Secrets Manager boto client.
:type config: aws_secretsmanager_caching.SecretCacheConfig
:param config: Secret cache configuration
:type client: botocore.client.BaseClient
:param client: botocore 'secretsmanager' client
"""
self._client = client
self._config = deepcopy(config)
self._cache = LRUCache(max_size=self._config.max_cache_size)
if self._client is None:
self._client = botocore.session.get_session().create_client("secretsmanager")
self._client.meta.config.user_agent_extra = "AwsSecretCache/{}".format(SecretCache.__version__)