canonicalwebteam.store-api 7.0.0__py3-none-any.whl → 7.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -29,8 +29,14 @@ class RedisCache:
29
29
  logger.warning("Redis unavailable: %s", e)
30
30
  self.redis_available = False
31
31
 
32
- def _build_key(self, key: str) -> str:
33
- return f"{self.namespace}:{key}"
32
+ def _build_key(self, base_key: str, **parts) -> str:
33
+ key_parts = ":".join(f"{k}-{v}" for k, v in parts.items() if v)
34
+ key = (
35
+ f"{self.namespace}:{base_key}:{key_parts}"
36
+ if key_parts
37
+ else f"{self.namespace}:{base_key}"
38
+ )
39
+ return key
34
40
 
35
41
  def _serialize(self, value: Any) -> str:
36
42
  if isinstance(value, str):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: canonicalwebteam.store-api
3
- Version: 7.0.0
3
+ Version: 7.1.0
4
4
  Summary:
5
5
  License: LGPL-3.0
6
6
  Author: Canonical Web Team
@@ -7,8 +7,8 @@ canonicalwebteam/store_api/dashboard.py,sha256=M5JLjTTahN-bfiVz9SuP6ahLjqEvOalwm
7
7
  canonicalwebteam/store_api/devicegw.py,sha256=i42fnc29-CF3vM_tm7mwoOjQraDhu41EDkxILle1pQ4,10627
8
8
  canonicalwebteam/store_api/publishergw.py,sha256=u2D2Y76xC8ms16XTZcUe_KmRdcyzqOV2g0aN9HYZBrQ,29702
9
9
  canonicalwebteam/stores_web_redis/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
10
- canonicalwebteam/stores_web_redis/utility.py,sha256=h-4AxoMM0TBYjgWgq6dlN1-c0VKzaB9ZDzSPe75CVdY,2787
11
- canonicalwebteam_store_api-7.0.0.dist-info/LICENSE,sha256=46mU2C5kSwOnkqkw9XQAJlhBL2JAf1_uCD8lVcXyMRg,7652
12
- canonicalwebteam_store_api-7.0.0.dist-info/METADATA,sha256=-iatcvbkeNQnpOgKOaPyTkdfl4LM1ckmUk05XMa1svI,2284
13
- canonicalwebteam_store_api-7.0.0.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
14
- canonicalwebteam_store_api-7.0.0.dist-info/RECORD,,
10
+ canonicalwebteam/stores_web_redis/utility.py,sha256=3bqTU1z9XWWeJdDdTjYxf6wxpUHwJKx_t2O58XkZeFI,3005
11
+ canonicalwebteam_store_api-7.1.0.dist-info/LICENSE,sha256=46mU2C5kSwOnkqkw9XQAJlhBL2JAf1_uCD8lVcXyMRg,7652
12
+ canonicalwebteam_store_api-7.1.0.dist-info/METADATA,sha256=UTfEh5py8vsIv8saK_FppLoTDpYSkRYgbu7ZVUyZHVQ,2284
13
+ canonicalwebteam_store_api-7.1.0.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
14
+ canonicalwebteam_store_api-7.1.0.dist-info/RECORD,,