Configure the following:
- rubygems-proxy ( -> http://rubygems.org )
rubygems-proxy is configured with
Artifact Max Age: -1
Item Max Age: 1440
Configure remote.storage.outbound logger at DEBUG level.
Request a gem file through the group found on rubygems.org
curl -u admin:admin123 http://localhost:8081/nexus/content/repositories/rubygems-group/gems/spreadsheet-1.1.1.gem -o /dev/null -v
This should return 200 response with correct content, and nexus should go remote since it does not have it cached yet.
Confirm the file is now cached at sonatype-work/nexus/storage/rubygems-proxy/gems/s/spreadsheet-1.1.1.gem
Make the same request again. Nexus goes remote again for the same file.
Since Artifact Max Age is -1, and the gem is already cached, Nexus should not go remote again until the actual gem file itself is no longer in the proxy repository cache or the max age for the specific gem is expired. Nexus should always check local first and serve it if present in storage. Once found, it should not continue to check any other member repositories of a group for the same gem.
Make sure Artifact Max Age works when the proxy is accessed directly also, or there is an equivalent request which requires resolution of the specific gem file requested.