In Artifactory, a fundamental assumption across all repository types is that artifacts are immutable - once published, they are not expected to change. Consequently, Generic repositories do not automatically fetch or cache updated versions of an artifact, even if the original file has been modified in the remote upstream source.
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.