@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)",
date="2023-03-28T21:34:27.376Z")
public class CacheControl
extends software.amazon.jsii.JsiiObject
Example:
Bucket destinationBucket; BucketDeployment.Builder.create(this, "BucketDeployment") .sources(List.of(Source.asset("./website", AssetOptions.builder().exclude(List.of("index.html")).build()))) .destinationBucket(destinationBucket) .cacheControl(List.of(CacheControl.fromString("max-age=31536000,public,immutable"))) .prune(false) .build(); BucketDeployment.Builder.create(this, "HTMLBucketDeployment") .sources(List.of(Source.asset("./website", AssetOptions.builder().exclude(List.of("*", "!index.html")).build()))) .destinationBucket(destinationBucket) .cacheControl(List.of(CacheControl.fromString("max-age=0,no-cache,no-store,must-revalidate"))) .prune(false) .build();
Modifier | Constructor and Description |
---|---|
protected |
CacheControl(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CacheControl(software.amazon.jsii.JsiiObjectRef objRef) |
Modifier and Type | Method and Description |
---|---|
static CacheControl |
fromString(java.lang.String s)
Constructs a custom cache control key from the literal value.
|
java.lang.Object |
getValue()
The raw cache control setting.
|
static CacheControl |
maxAge(Duration t)
Sets 'max-age=
|
static CacheControl |
mustRevalidate()
Sets 'must-revalidate'.
|
static CacheControl |
noCache()
Sets 'no-cache'.
|
static CacheControl |
noTransform()
Sets 'no-transform'.
|
static CacheControl |
proxyRevalidate()
Sets 'proxy-revalidate'.
|
static CacheControl |
setPrivate()
Sets 'private'.
|
static CacheControl |
setPublic()
Sets 'public'.
|
static CacheControl |
sMaxAge(Duration t)
Sets 's-maxage=
|
protected CacheControl(software.amazon.jsii.JsiiObjectRef objRef)
protected CacheControl(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public static CacheControl fromString(java.lang.String s)
s
- This parameter is required.public static CacheControl maxAge(Duration t)
t
- This parameter is required.public static CacheControl mustRevalidate()
public static CacheControl noCache()
public static CacheControl noTransform()
public static CacheControl proxyRevalidate()
public static CacheControl setPrivate()
public static CacheControl setPublic()
public static CacheControl sMaxAge(Duration t)
t
- This parameter is required.public java.lang.Object getValue()