+ with self._session.get(url, timeout=self._timeout, headers=_headers) as r:
+ r.raise_for_status()
+ return r.content
+
+
+class _CachingFetcher(Fetcher):
+
+ def __init__(
+ self,
+ session: requests_cache.CachedSession,
+ timeout: int) -> None:
+ self._session = session
+ self._timeout = timeout
+ self._request_count = 0
+ self._cache_hit_count = 0
+
+ def fetch(self, url: str) -> bytes:
+ with self._session.get(url, timeout=self._timeout, headers=_headers) as r: