nexusnexus3

Cache issue with NPM publish and Nexus groups


We have the following setup in our Nexus (3.15.2-01) instance for NPM packages:

npm-group (npm: group)
├── npm-private-repository (npm: proxy)
└── npm-proxy-to-npmjs.com (npm: hosted)

When we publish a NPM package to npmjs.com, it is not immediately available in the proxy repository (meaning that npm view my-package@x.y.z returns no result. So far I understand there is cache on the proxy and I need to clear it on this proxy, nothing strange.

But what is curious is that clearing cache on the proxy repository is not enough, I also need to clear the cache on the group.

Is it an expected behaviour? I find it inconvenient because on a group there is no option to say "clear cache every n minutes" and therefore I need to do it manually. Also, I need to use the "admin" user to be able to click on the "Invalidate cache" button. I tried to give the privilege to a group of user to do that but could not find the relevant privilege. I can only give them access to the administration page for this repository, but the button is disabled.

Could someone tell me if it's normal and/or how I could improve this workflow?


Solution

  • Unfortunately this is a bug. We are working on a fix for it right now, please follow this issue for updates : https://issues.sonatype.org/browse/NEXUS-19384