Show More
@@ -277,8 +277,7 b' class InvalidationContext(object):' | |||
|
277 | 277 | """ |
|
278 | 278 | |
|
279 | 279 | def __repr__(self): |
|
280 |
return '<InvalidationContext:{}[{}]>' |
|
|
281 | safe_str(self.cache_key), safe_str(self.uid)) | |
|
280 | return f'<InvalidationContext:{self.cache_key}[{self.uid}]>' | |
|
282 | 281 | |
|
283 | 282 | def __init__(self, uid, invalidation_namespace='', |
|
284 | 283 | raise_exception=False, thread_scoped=None): |
@@ -311,9 +310,10 b' class InvalidationContext(object):' | |||
|
311 | 310 | cache_obj_map = CacheKey.get_namespace_map(invalidation_namespace) |
|
312 | 311 | cache_obj = cache_obj_map.get(self.cache_key) |
|
313 | 312 | log.debug('Fetched cache obj %s using %s cache key.', cache_obj, self.cache_key) |
|
313 | ||
|
314 | 314 | if not cache_obj: |
|
315 | 315 | new_cache_args = invalidation_namespace |
|
316 |
first_cache_obj = next(cache_obj_map. |
|
|
316 | first_cache_obj = next(iter(cache_obj_map.values())) if cache_obj_map else None | |
|
317 | 317 | cache_state_uid = None |
|
318 | 318 | if first_cache_obj: |
|
319 | 319 | cache_state_uid = first_cache_obj.cache_state_uid |
General Comments 0
You need to be logged in to leave comments.
Login now