Skip to content

Commit 739907e

Browse files
authored
Merge pull request #509 from hubmapconsortium/yuanzhou/cache-improvement
Check existence
2 parents 5c66102 + 938cb5b commit 739907e

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/app.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4535,7 +4535,15 @@ def delete_cache(id):
45354535
upload_dict = schema_neo4j_queries.get_dataset_upload(neo4j_driver_instance, entity_uuid)
45364536

45374537
# We only use uuid in the cache key acorss all the cache types
4538-
uuids_list = [entity_uuid] + child_uuids + collection_dataset_uuids + upload_dataset_uuids + collection_uuids + [collection_dict['uuid']] + [upload_dict['uuid']]
4538+
uuids_list = [entity_uuid] + child_uuids + collection_dataset_uuids + upload_dataset_uuids + collection_uuids
4539+
4540+
# It's possible no linked collection or upload
4541+
if collection_dict:
4542+
uuids_list.append(collection_dict['uuid'])
4543+
4544+
if upload_dict:
4545+
uuids_list.append(upload_dict['uuid'])
4546+
45394547
schema_manager.delete_memcached_cache(uuids_list)
45404548

45414549

0 commit comments

Comments
 (0)