Zap Cache

JFrog REST APIs

Content Type
REST API
ft:sourceType
Paligo

Description:

Zapping cache invalidates all cached metadata artifacts downloaded from central registries like pypi.org,  repo1.maven.orgregistry.npmjs.org and stored in remote repo cache to speed up remote repo actions.

Note

The zapping action does not invalidate immutable artifacts (like software binaries). As they are immutable, there is no need to bring them again from the central repository.

After Zapping, whenever an invalidated metadata artifact is needed, Artifactory refreshes it from the central registry first. If unavailable, it falls back to the stale version.

Zapping the cache may slow down for clients who download packages requiring stale metadata updates.

Zapping cache solves:

  • Resolving Cache Issues: If there are problems with the cached packages artifacts, such as corruption or inconsistencies with the central repository, zapping the cache fixes these issues.

For zapping a cache via the UI, refer to Zapping Caches.Zapping Caches

Since: 7.49.3

Security: Requires a privileged user, Manage or Delete permissions on the Remote Repository.

Usage: POST https://<host>/artifactory/api/zap/<repository-name>-cache/<repository-path>

Sample Usage:

POST https://localhost:8081/artifactory/api/zap/repo1-cache/com/acme-new

Sample Output:

{“Message”:”Completed zapping cache in path repo1-cache/com/acme-new”}