File tree 1 file changed +5
-2
lines changed
src/dynamodb_encryption_sdk/material_providers
1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -112,6 +112,7 @@ def get(self, name):
112
112
def clear (self ):
113
113
# type: () -> None
114
114
"""Clear the cache."""
115
+ _LOGGER .debug ("Clearing cache" )
115
116
with self ._cache_lock :
116
117
self ._cache = OrderedDict () # type: OrderedDict[Any, Any] # pylint: disable=attribute-defined-outside-init
117
118
@@ -163,8 +164,10 @@ def decryption_materials(self, encryption_context):
163
164
"""
164
165
version = self ._provider_store .version_from_material_description (encryption_context .material_description )
165
166
try :
167
+ _LOGGER .debug ("Looking in cache for decryption materials provider version %d" , version )
166
168
provider = self ._cache .get (version )
167
169
except KeyError :
170
+ _LOGGER .debug ("Decryption materials provider not found in cache" )
168
171
try :
169
172
provider = self ._provider_store .provider (self ._material_name , version )
170
173
except InvalidVersionError :
@@ -281,10 +284,10 @@ def encryption_materials(self, encryption_context):
281
284
282
285
if ttl_action is TtlActions .LIVE :
283
286
try :
284
- _LOGGER .debug ("Looking in cache for materials provider version %d" , self ._version )
287
+ _LOGGER .debug ("Looking in cache for encryption materials provider version %d" , self ._version )
285
288
provider = self ._cache .get (self ._version )
286
289
except KeyError :
287
- _LOGGER .debug ("Provider not found in cache" )
290
+ _LOGGER .debug ("Encryption materials provider not found in cache" )
288
291
ttl_action = TtlActions .EXPIRED
289
292
290
293
if provider is None :
You can’t perform that action at this time.
0 commit comments