Skip to content

Commit bcf45cd

Browse files
authored
Logs: remove caching without tags log warning (#10376)
This line is being logged because for some responses we add the cache tags later in the middleware. We have plenty of tests to make sure the cache tags are present, so this isn't a problem.
1 parent 251ff12 commit bcf45cd

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

readthedocs/proxito/cache.py

-5
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,6 @@ def cache_response(response, cache_tags=None, force=True):
4545
if cache_tags:
4646
add_cache_tags(response, cache_tags)
4747
if force or CDN_CACHE_CONTROL_HEADER not in response.headers:
48-
if not response.headers.get(CACHE_TAG_HEADER):
49-
# Caching a response at the CDN level without cache tags is
50-
# incorrect, since we won't be able to purge it otherwise.
51-
log.warning("Caching response without cache tags.")
52-
5348
response.headers[CDN_CACHE_CONTROL_HEADER] = "public"
5449

5550

0 commit comments

Comments
 (0)