Skip to content

Commit

Permalink
add NEWS
Browse files Browse the repository at this point in the history
  • Loading branch information
cosmicexplorer committed Sep 3, 2023
1 parent 85c4f71 commit b69c817
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions news/12257.feature.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Store HTTP caching headers in ``~/.cache/pip/fetch-resolve`` to reduce bandwidth usage when ``--use-feature=metadata-cache`` is enabled.
2 changes: 1 addition & 1 deletion src/pip/_internal/cli/req_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ def _build_package_finder(
ignore_requires_python=ignore_requires_python,
)

if options.cache_dir:
if bool(options.cache_dir) and ("metadata-cache" in options.features_enabled):
fetch_resolve_cache = FetchResolveCache(options.cache_dir)
else:
fetch_resolve_cache = None
Expand Down

0 comments on commit b69c817

Please sign in to comment.