Skip to content

Commit

Permalink
Merge pull request #47 from akursar/short-circuit-resp-not-found
Browse files Browse the repository at this point in the history
fix: short circuit get_response when no resp found
  • Loading branch information
JWCook committed Apr 7, 2021
2 parents 5703d64 + e8de998 commit 52ba9de
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions aiohttp_client_cache/backends/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ async def get_response(self, key: str) -> Optional[CachedResponse]:

if not response:
logger.debug('No cached response found')
return None

# If the item is expired or filtered out, delete it from the cache
if not self.is_cacheable(response):
Expand Down

0 comments on commit 52ba9de

Please sign in to comment.