Change the way that missing cache ids are found.
This is probalby faster but in any way it maks debugging a lot easier. To go though a big list in a for-loop is no fun at all.
This commit is contained in:
parent
1eb9236a76
commit
97b21427aa
@ -300,10 +300,10 @@ class Collection:
|
|||||||
cached_full_data_dict = cache.get_many(cache_keys)
|
cached_full_data_dict = cache.get_many(cache_keys)
|
||||||
|
|
||||||
# Get all ids that are missing.
|
# Get all ids that are missing.
|
||||||
missing_ids = set()
|
missing_cache_keys = set(cache_keys).difference(cached_full_data_dict.keys())
|
||||||
for cache_key in cache_keys:
|
missing_ids = set(
|
||||||
if cache_key not in cached_full_data_dict:
|
get_collection_id_from_cache_key(cache_key)[1]
|
||||||
missing_ids.add(get_collection_id_from_cache_key(cache_key)[1])
|
for cache_key in missing_cache_keys)
|
||||||
|
|
||||||
# Generate collection elements that where in the cache.
|
# Generate collection elements that where in the cache.
|
||||||
for cache_key, cached_full_data in cached_full_data_dict.items():
|
for cache_key, cached_full_data in cached_full_data_dict.items():
|
||||||
|
Loading…
Reference in New Issue
Block a user