From 48492fc620202b5e61564518b507e61446f1831e Mon Sep 17 00:00:00 2001 From: vincentsarago Date: Thu, 1 Feb 2024 16:07:52 +0100 Subject: [PATCH] use json for hashkey --- titiler/cmr/backend.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/titiler/cmr/backend.py b/titiler/cmr/backend.py index 04ae190..5c77c27 100644 --- a/titiler/cmr/backend.py +++ b/titiler/cmr/backend.py @@ -1,5 +1,6 @@ """TiTiler.cmr custom Mosaic Backend.""" +import json from typing import Any, Dict, List, Optional, Tuple, Type, TypedDict import attr @@ -146,7 +147,7 @@ def assets_for_bbox( @cached( # type: ignore TTLCache(maxsize=cache_config.maxsize, ttl=cache_config.ttl), key=lambda self, xmin, ymin, xmax, ymax, **kwargs: hashkey( - self.input, str(xmin), str(ymin), str(xmax), str(ymax), **kwargs + self.input, str(xmin), str(ymin), str(xmax), str(ymax), json.dumps(kwargs) ), ) @retry(