Skip to content

Commit 3fadea9

Browse files
add NEWS
1 parent ca31213 commit 3fadea9

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

news/12257.feature.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Store HTTP caching headers in ``~/.cache/pip/fetch-resolve`` to reduce bandwidth usage when ``--use-feature=metadata-cache`` is enabled.

src/pip/_internal/cli/req_command.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,7 @@ def _build_package_finder(
506506
ignore_requires_python=ignore_requires_python,
507507
)
508508

509-
if options.cache_dir:
509+
if bool(options.cache_dir) and ("metadata-cache" in options.features_enabled):
510510
fetch_resolve_cache = FetchResolveCache(options.cache_dir)
511511
else:
512512
fetch_resolve_cache = None

0 commit comments

Comments
 (0)