diff --git a/aiohttp_client_cache/backends/base.py b/aiohttp_client_cache/backends/base.py index 87f55fa..c6a2598 100644 --- a/aiohttp_client_cache/backends/base.py +++ b/aiohttp_client_cache/backends/base.py @@ -254,7 +254,7 @@ async def close(self): await self.responses.close() await self.redirects.close() - async def close_if_enabled(self): + async def _close_if_enabled(self): """Close any active connections, if ``autoclose`` is enabled""" if self.autoclose: await self.close() diff --git a/aiohttp_client_cache/session.py b/aiohttp_client_cache/session.py index 498a128..ef81c77 100644 --- a/aiohttp_client_cache/session.py +++ b/aiohttp_client_cache/session.py @@ -65,7 +65,7 @@ async def _request( async def close(self): """Close both aiohttp connector and any backend connection(s) on contextmanager exit""" await super().close() - await self.cache.close_if_enabled() + await self.cache._close_if_enabled() @asynccontextmanager async def disabled(self):