style: remove redundant cache copy comments

This commit is contained in:
Charan Rathore 2026-09-28 09:48:29 +05:30
parent 7fb2c11eb5
commit d5d8bca2d1

View file

@ -217,8 +217,6 @@ class InMemoryCache(BaseCache):
try:
cached_response = json.loads(original_cached_response)
except (TypeError, ValueError):
# JSON strings already produce a new value. Isolate mutable data
# stored as Python objects without copying cached clients or handles.
if isinstance(original_cached_response, (dict, list, BaseModel)):
return deepcopy(original_cached_response)
return original_cached_response