Enum Class CacheRetention

java.lang.Object
java.lang.Enum<CacheRetention>
org.apache.maven.api.cache.CacheRetention
All Implemented Interfaces:
Serializable, Comparable<CacheRetention>, Constable

@Experimental public enum CacheRetention extends Enum<CacheRetention>
Enumeration defining different retention periods for cached data. Each value represents a specific scope and lifetime for cached items.
Since:
4.0.0
  • Enum Constant Details

    • PERSISTENT

      public static final CacheRetention PERSISTENT
      Data should be persisted across Maven invocations. Suitable for: - Dependency resolution results - Compilation outputs - Downloaded artifacts
    • SESSION_SCOPED

      public static final CacheRetention SESSION_SCOPED
      Data should be retained for the duration of the current Maven session. Suitable for: - Build-wide configuration - Project model caching - Inter-module metadata
    • REQUEST_SCOPED

      public static final CacheRetention REQUEST_SCOPED
      Data should only be retained for the current build request. Suitable for: - Plugin execution results - Temporary build artifacts - Phase-specific data
    • DISABLED

      public static final CacheRetention DISABLED
      Caching should be disabled for this data. Suitable for: - Sensitive information - Non-deterministic operations - Debug or development data
  • Method Details

    • values

      public static CacheRetention[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static CacheRetention valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null