Uplinks are checked too often
There seems to be a regression of the behavior reported in https://github.com/verdaccio/verdaccio/issues/119
When cache revalidation receives HTTP 304 Not Modified, Verdaccio converts it into an internal error. https://github.com/verdaccio/verdaccio/blob/dac2d7f620d0f137ba947bf0e1dbf06906523262/packages/proxy/src/proxy.ts#L404-L410
The storage layer catches that error and continues to the next configured uplink: https://github.com/verdaccio/verdaccio/blob/dac2d7f620d0f137ba947bf0e1dbf06906523262/packages/store/src/storage.ts#L1701-L1722
The fetched timestamp is updated only after getRemoteMetadata() returns successfully. Because the 304 throw, this never happens. https://github.com/verdaccio/verdaccio/blob/dac2d7f620d0f137ba947bf0e1dbf06906523262/packages/store/src/storage.ts#L1791-L1803
After maxage expires, the cached metadata remains stale even when the uplink confirms that it has not changed. Every subsequent request performs another cache revalidation against the uplink. If multiple uplinks are configured, a 304 from one uplink causes additional unnecessary uplink hits.
Tested with 7.x-next (https://hub.docker.com/layers/verdaccio/verdaccio/7.x-next/images/sha256-1b628720f571b592c853df1a76d691b2260de2b57123f5483ddf825726fa9e39)
Source: verdaccio/verdaccio