fix(cache): preserve generic cache key typing

This commit is contained in:
Bao Yansong 2026-10-10 05:06:14 +00:00
parent 0002b538c1
commit f9eb141e77

View file

@ -47,7 +47,7 @@ class InMemoryCache(BaseCache):
self.max_size_per_item = max_size_per_item or MAX_SIZE_PER_ITEM_IN_MEMORY_CACHE_IN_KB # 1MB = 1024KB
# in-memory cache
self.cache_dict: dict[str, Any] = {}
self.cache_dict: dict[object, Any] = {}
self.ttl_dict: dict = {}
self.expiration_heap: list[tuple[float, str]] = []
self._increment_lock = threading.Lock()