Enum LocalCacheMode

All Implemented Interfaces:
Serializable, Comparable<LocalCacheMode>, java.lang.constant.Constable

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:41.827Z") @Stability(Stable) public enum LocalCacheMode extends Enum<LocalCacheMode>
Local cache modes to enable for the CodeBuild Project.


 Project.Builder.create(this, "Project")
         // Enable Docker AND custom caching
         .cache(Cache.local(LocalCacheMode.DOCKER_LAYER, LocalCacheMode.CUSTOM))
         // BuildSpec with a 'cache' section necessary for 'CUSTOM' caching. This can
         // also come from 'buildspec.yml' in your source.
                 "version", "0.2",
                 "phases", Map.of(
                         "build", Map.of(
                                 "commands", List.of("..."))),
                 "cache", Map.of(
                         "paths", List.of("/root/cachedir/**/*")))))
  • Enum Constant Details

    • SOURCE

      @Stability(Stable) public static final LocalCacheMode SOURCE
      Caches Git metadata for primary and secondary sources.

      @Stability(Stable) public static final LocalCacheMode DOCKER_LAYER
      Caches existing Docker layers.
    • CUSTOM

      @Stability(Stable) public static final LocalCacheMode CUSTOM
      Caches directories you specify in the buildspec file.
  • Method Details

    • values

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

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