Skip to content

Commit

Permalink
use json for hashkey
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentsarago committed Feb 1, 2024
1 parent a46a86c commit 48492fc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion titiler/cmr/backend.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"""TiTiler.cmr custom Mosaic Backend."""

import json
from typing import Any, Dict, List, Optional, Tuple, Type, TypedDict

import attr
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit 48492fc

Please sign in to comment.