@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:37.358Z") @Stability(value=Stable) public enum LocalCacheMode extends Enum<LocalCacheMode>
Example:
Project.Builder.create(this, "Project")
.source(Source.gitHubEnterprise(GitHubEnterpriseSourceProps.builder()
.httpsCloneUrl("https://my-github-enterprise.com/owner/repo")
.build()))
// 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.
.buildSpec(BuildSpec.fromObject(Map.of(
"version", "0.2",
"phases", Map.of(
"build", Map.of(
"commands", List.of("..."))),
"cache", Map.of(
"paths", List.of("/root/cachedir/**/*")))))
.build();
| Enum Constant and Description |
|---|
CUSTOM
Caches directories you specify in the buildspec file.
|
DOCKER_LAYER
Caches existing Docker layers.
|
SOURCE
Caches Git metadata for primary and secondary sources.
|
| Modifier and Type | Method and Description |
|---|---|
static LocalCacheMode |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static LocalCacheMode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
@Stability(value=Stable) public static final LocalCacheMode SOURCE
@Stability(value=Stable) public static final LocalCacheMode DOCKER_LAYER
@Stability(value=Stable) public static final LocalCacheMode CUSTOM
public static LocalCacheMode[] values()
for (LocalCacheMode c : LocalCacheMode.values()) System.out.println(c);
public static LocalCacheMode valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullCopyright © 2022. All rights reserved.