Skip to content

Commit

Permalink
Relax content cache: require ETag OR Last-Modified, not both
Browse files Browse the repository at this point in the history
  • Loading branch information
amywieliczka committed Sep 30, 2024
1 parent 73b8ae6 commit 4d6ea0f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions content_harvester/by_record.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,9 +212,9 @@ def check_component_cache(
# Do a head request to get the current ETag and
# Last-Modified values, used to create a cache key
head_resp = http_session.head(**asdict(request))
if (
not head_resp.headers.get('ETag') or
not head_resp.headers.get('Last-Modified')
if not (
head_resp.headers.get('ETag') or
head_resp.headers.get('Last-Modified')
):
print(
f"{component_type}: No ETag or Last-Modified headers, "
Expand Down

0 comments on commit 4d6ea0f

Please sign in to comment.