class CacheControl
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.CodePipeline.Actions.CacheControl |
Java | software.amazon.awscdk.services.codepipeline.actions.CacheControl |
Python | aws_cdk.aws_codepipeline_actions.CacheControl |
TypeScript (source) | @aws-cdk/aws-codepipeline-actions » CacheControl |
Used for HTTP cache-control header, which influences downstream caches.
Use the provided static factory methods to construct instances of this class. Used in the {@link S3DeployActionProps.cacheControl} property.
See also: https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as codepipeline_actions from '@aws-cdk/aws-codepipeline-actions';
const cacheControl = codepipeline_actions.CacheControl.fromString('s');
Properties
Name | Type | Description |
---|---|---|
value | string | the actual text value of the created directive. |
value
Type:
string
the actual text value of the created directive.
Methods
Name | Description |
---|---|
static from | Allows you to create an arbitrary cache control directive, in case our support is missing a method for a particular directive. |
static max | The 'max-age' cache control directive. |
static must | The 'must-revalidate' cache control directive. |
static no | The 'no-cache' cache control directive. |
static no | The 'no-transform' cache control directive. |
static proxy | The 'proxy-revalidate' cache control directive. |
static s | The 's-max-age' cache control directive. |
static set | The 'private' cache control directive. |
static set | The 'public' cache control directive. |
String(s)
static frompublic static fromString(s: string): CacheControl
Parameters
- s
string
Returns
Allows you to create an arbitrary cache control directive, in case our support is missing a method for a particular directive.
Age(t)
static maxpublic static maxAge(t: Duration): CacheControl
Parameters
- t
Duration
Returns
The 'max-age' cache control directive.
Revalidate()
static mustpublic static mustRevalidate(): CacheControl
Returns
The 'must-revalidate' cache control directive.
Cache()
static nopublic static noCache(): CacheControl
Returns
The 'no-cache' cache control directive.
Transform()
static nopublic static noTransform(): CacheControl
Returns
The 'no-transform' cache control directive.
Revalidate()
static proxypublic static proxyRevalidate(): CacheControl
Returns
The 'proxy-revalidate' cache control directive.
MaxAge(t)
static spublic static sMaxAge(t: Duration): CacheControl
Parameters
- t
Duration
Returns
The 's-max-age' cache control directive.
Private()
static setpublic static setPrivate(): CacheControl
Returns
The 'private' cache control directive.
Public()
static setpublic static setPublic(): CacheControl
Returns
The 'public' cache control directive.