Class CacheControl
java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.s3.deployment.CacheControl
- All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable
@Generated(value="jsii-pacmak/1.104.0 (build e79254c)",
date="2024-11-22T02:24:08.954Z")
@Stability(Stable)
public class CacheControl
extends software.amazon.jsii.JsiiObject
Used for HTTP cache-control header, which influences downstream caches.
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.maxAge(Duration.days(365)), CacheControl.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.maxAge(Duration.seconds(0)))) .prune(false) .build();
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
-
Constructor Summary
ModifierConstructorDescriptionprotected
CacheControl
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
CacheControl
(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionstatic CacheControl
fromString
(String s) Constructs a custom cache control key from the literal value.getValue()
The raw cache control setting.static CacheControl
Sets 'immutable'.static CacheControl
Sets 'max-age=invalid input: '<'duration-in-seconds>'.static CacheControl
Sets 'must-revalidate'.static CacheControl
Sets 'must-understand'.static CacheControl
noCache()
Sets 'no-cache'.static CacheControl
noStore()
Sets 'no-store'.static CacheControl
Sets 'no-transform'.static CacheControl
Sets 'proxy-revalidate'.static CacheControl
Sets 'private'.static CacheControl
Sets 'public'.static CacheControl
Sets 's-maxage=invalid input: '<'duration-in-seconds>'.static CacheControl
Sets 'stale-if-error=invalid input: '<'duration-in-seconds>'.static CacheControl
Sets 'stale-while-revalidate=invalid input: '<'duration-in-seconds>'.Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
CacheControl
protected CacheControl(software.amazon.jsii.JsiiObjectRef objRef) -
CacheControl
protected CacheControl(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
-
-
Method Details
-
fromString
Constructs a custom cache control key from the literal value.- Parameters:
s
- This parameter is required.
-
immutable
Sets 'immutable'. -
maxAge
Sets 'max-age=invalid input: '<'duration-in-seconds>'.- Parameters:
t
- This parameter is required.
-
mustRevalidate
Sets 'must-revalidate'. -
mustUnderstand
Sets 'must-understand'. -
noCache
Sets 'no-cache'. -
noStore
Sets 'no-store'. -
noTransform
Sets 'no-transform'. -
proxyRevalidate
Sets 'proxy-revalidate'. -
setPrivate
Sets 'private'. -
setPublic
Sets 'public'. -
sMaxAge
Sets 's-maxage=invalid input: '<'duration-in-seconds>'.- Parameters:
t
- This parameter is required.
-
staleIfError
Sets 'stale-if-error=invalid input: '<'duration-in-seconds>'.- Parameters:
t
- This parameter is required.
-
staleWhileRevalidate
Sets 'stale-while-revalidate=invalid input: '<'duration-in-seconds>'.- Parameters:
t
- This parameter is required.
-
getValue
The raw cache control setting.
-