Skip to content

Commit 2781dfc

Browse files
committed
update the cache key
Signed-off-by: tdruez <tdruez@aboutcode.org>
1 parent 93b46fa commit 2781dfc

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

component_catalog/license_expression_dje.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def get_dataspace_licensing(dataspace, license_keys=None):
5959
# Bypass cache if license_keys is provided
6060
return fetch_licensing_for_dataspace(dataspace, license_keys)
6161

62-
cache_key = str({dataspace.name})
62+
cache_key = str(dataspace.uuid)
6363
# First look in the cache for an existing Licensing for this Dataspace
6464
licensing = licensing_cache.get(cache_key)
6565

component_catalog/tests/test_license_expression_dje.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ def test_fetch_licensing_for_dataspace(self):
299299

300300
def test_get_dataspace_licensing(self):
301301
licensing_cache = caches["licensing"]
302-
cache_key = str({self.dataspace.name})
302+
cache_key = str(self.dataspace.uuid)
303303
self.assertFalse(licensing_cache.has_key(cache_key))
304304

305305
licensing = get_dataspace_licensing(self.dataspace)

0 commit comments

Comments
 (0)