@@ -36,25 +36,21 @@ def wrapper(*args, **kwargs):
36
36
)
37
37
value = sentinel
38
38
39
+ # If there is an issue with our cache client deserializing the value (due to memory or some other issue),
40
+ # we get a None response so log anytime this happens
39
41
if value is None :
40
42
logger .warning (
41
43
'None cache value found for cache key: {}, function cache key: {}, value: {}' .format (
42
44
cache_key , function_cache_key , value
43
45
)
44
46
)
45
47
46
- # Need to check for None as well because the cache client sends a None response at times
47
48
if value is sentinel or value is None :
48
49
value = func (* args , ** kwargs )
49
50
# Try and set the key, value pair in the cache.
50
51
# But if it fails on an error from the underlying
51
52
# cache system, handle it.
52
53
try :
53
- logger .info (
54
- 'Setting cache key: {}, value: {} for function cache key: {}' .format (
55
- cache_key , value , function_cache_key
56
- )
57
- )
58
54
cache .set (cache_key , value , timeout )
59
55
except CacheSetError :
60
56
logger .warning (
@@ -104,25 +100,21 @@ def wrapper(*args, **kwargs):
104
100
)
105
101
value = sentinel
106
102
103
+ # If there is an issue with our cache client deserializing the value (due to memory or some other issue),
104
+ # we get a None response so log anytime this happens
107
105
if value is None :
108
106
logger .warning (
109
107
'None cache value found for cache key: {}, function cache key: {}, value: {}' .format (
110
108
cache_key , function_cache_key , value
111
109
)
112
110
)
113
111
114
- # Need to check for None as well because the cache client sends a None response at times
115
112
if value is sentinel or value is None :
116
113
value = func (* args , ** kwargs )
117
114
# Try and set the key, value pair in the cache.
118
115
# But if it fails on an error from the underlying
119
116
# cache system, handle it.
120
117
try :
121
- logger .info (
122
- 'Setting cache key: {}, value: {} for function cache key: {}' .format (
123
- cache_key , value , function_cache_key
124
- )
125
- )
126
118
cache .set (cache_key , value , timeout )
127
119
except CacheSetError :
128
120
logger .warning (
@@ -193,25 +185,21 @@ def __call__(self, *args, **kwargs):
193
185
)
194
186
value = sentinel
195
187
188
+ # If there is an issue with our cache client deserializing the value (due to memory or some other issue),
189
+ # we get a None response so log anytime this happens
196
190
if value is None :
197
191
logger .warning (
198
192
'None cache value found for cache key: {}, function cache key: {}, value: {}' .format (
199
193
cache_key , function_cache_key , value
200
194
)
201
195
)
202
196
203
- # Need to check for None as well because the cache client sends a None response at times
204
197
if value is sentinel or value is None :
205
198
value = self .func (* args , ** kwargs )
206
199
# Try and set the key, value pair in the cache.
207
200
# But if it fails on an error from the underlying
208
201
# cache system, handle it.
209
202
try :
210
- logger .info (
211
- 'Setting cache key: {}, value: {} for function cache key: {}' .format (
212
- cache_key , value , function_cache_key
213
- )
214
- )
215
203
cache .set (cache_key , value , timeout )
216
204
except CacheSetError :
217
205
logger .warning (
0 commit comments