pdm icon indicating copy to clipboard operation
pdm copied to clipboard

Cache support for Nexus

Open krisdevopsbot opened this issue 1 year ago • 1 comments

Is your feature/enhancement proposal related to a problem? Please describe.

The http caching mechanism uses the sha sum as far as I can tell, when pointed to pypi.org requests's download url is of the form:

https://files.pythonhosted.org/packages/ba/bb/dfa0141a32d773c47e4dede1a617c59a23b74dd302e449cf85413fc96bc4/requests-0.2.0.tar.gz#sha256=813202ace4d9301a3c00740c700e012fb9f3f8c73ddcfe02ab558a8df6f175fd

When using nexus3 (typical in a corp environment) the pypi.org urls have the sha256 appended at the end

http://127.0.0.1:8081/repository/pypi.org/simple/requests/ index includes links such as:

http://127.0.0.1:8081/repository/pypi.org/packages/requests/0.2.0/requests-0.2.0.tar.gz#sha256=813202ace4d9301a3c00740c700e012fb9f3f8c73ddcfe02ab558a8df6f175fd

Based on https://community.sonatype.com/t/nexus-3-as-a-pypi-mirror-how-do-i-get-the-json-data-for-a-given-package/13448 they only support https://peps.python.org/pep-0503/

Describe the solution you'd like

Support http caching for nexus proxies.

krisdevopsbot avatar Oct 01 '24 01:10 krisdevopsbot

What is the difference here, the shasum are in the same form. what is not cached?

frostming avatar Oct 05 '24 03:10 frostming