From 85149554245f3e466da792ddfe0fcaeb0b5a7d20 Mon Sep 17 00:00:00 2001 From: Adithya Raj Date: Fri, 22 May 2026 03:21:19 +0000 Subject: [PATCH] fix: clarify cache miss log message When cached entries fail the Vary header check, we were logging deserialization failed even though the entry is valid but unusable for the current request. Adjust the wording to avoid confusion in troubleshooting output. --- cachecontrol/controller.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cachecontrol/controller.py b/cachecontrol/controller.py index 733684f..71286e8 100644 --- a/cachecontrol/controller.py +++ b/cachecontrol/controller.py @@ -163,7 +163,7 @@ def _load_from_cache(self, request: PreparedRequest) -> HTTPResponse | None: result = self.serializer.loads(request, cache_data, body_file) if result is None: - logger.debug("Cache entry deserialization failed, entry ignored") + logger.debug("Cache entry not usable for request, entry ignored") return result def cached_request(self, request: PreparedRequest) -> HTTPResponse | Literal[False]: