ARTIFACTORY: Why isn't the Generic remote repository cache automatically updated?

ARTIFACTORY: Why isn't the Generic remote repository cache automatically updated?

AuthorFullName__c
Elina Floim
articleNumber
000005708
ft:sourceType
Salesforce
FirstPublishedDate
2023-05-03T11:01:21Z
lastModifiedDate
2023-05-02
VersionNumber
1

Artifactory supports various remote repository types such as Docker, Maven, NPM, and many more. A remote repository serves as a caching proxy for a repository managed at a remote URL. Artifacts are stored and updated in remote repositories according to various configuration parameters that control the caching and proxying behavior. 

Unlike other remote repositories, there is no mechanism in Generic remote repositories that checks whether the metadata in the upstream registry has been changed and whether an updated file exists. Generic repositories do not maintain separate package indexes, because they are not specific to any package type, therefore, the cache expiry mechanism does not apply to these types of repositories. 
 
Due to the above, since there is no actual metadata expiry mechanism for generic repositories, even if a new and updated version of the requested file already exists in the upstream registry, it will not be requested if the file is already cached in the remote-cache repository and no new requests will be performed from Artifactory to the upstream in order to retrieve a new version of the file. In cases where an updated version of a file needs to be requested, there are a few possible approaches:
 

  • Delete the cached file from the remote-cache repository prior to requesting the file again. This will force Artifactory to query the upstream and download the latest available file. For example:
$ curl -X DELETE http://ART_HOST/artifactory/updates-jenkins/update-center.json
$ curl http://ART_HOST/artifactory/updates-jenkins/update-center.json
  • Disable the “Store Artifacts Locally” checkbox in the remote repository’s advanced settings tab. When set, the repository should store cached artifacts locally. When not set, artifacts are not stored locally, and direct repository-to-client streaming is used. When a file is requested, the remote repository will request it directly from the upstream and serve it to the client, but it will not be cached.