Revert "[aether-dependency-resolver] IJI-1457 Disable all errors caching"

This reverts commit 22c9953d8087c719190e49f8b00781dbd2e4206c.

GitOrigin-RevId: e53e23c43704fc44471ac73501bac396f544d48b
This commit is contained in:
Vladislav.Yaroshchuk
2023-12-20 00:27:48 +04:00
committed by intellij-monorepo-bot
parent 6de7456694
commit 7142eb461b

View File

@@ -162,11 +162,8 @@ public final class ArtifactRepositoryManager {
// Disable transfer errors caching to force re-request missing artifacts and metadata on network failures.
// Despite this, some errors are still cached in session data, and for proper retries work we must reset this data after failure
// what's performed by retryWithClearSessionData()
//
// a note: ResolutionErrorPolicy.CACHE_NOT_FOUND is not suitable because 5xx response is still cached in local repository and
// not re-requested, see IJI-1457
var artifactCachePolicy = ResolutionErrorPolicy.CACHE_DISABLED;
var metadataCachePolicy = ResolutionErrorPolicy.CACHE_DISABLED;
var artifactCachePolicy = ResolutionErrorPolicy.CACHE_NOT_FOUND;
var metadataCachePolicy = ResolutionErrorPolicy.CACHE_NOT_FOUND;
session.setResolutionErrorPolicy(new SimpleResolutionErrorPolicy(artifactCachePolicy, metadataCachePolicy));
session.setCache(new DefaultRepositoryCache());