class CacheControl
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.CodePipeline.Actions.CacheControl |
![]() | software.amazon.awscdk.services.codepipeline.actions.CacheControl |
![]() | aws_cdk.aws_codepipeline_actions.CacheControl |
![]() | @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. |
static fromString(s)
public 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.
static maxAge(t)
public static maxAge(t: Duration): CacheControl
Parameters
- t
Duration
Returns
The 'max-age' cache control directive.
static mustRevalidate()
public static mustRevalidate(): CacheControl
Returns
The 'must-revalidate' cache control directive.
static noCache()
public static noCache(): CacheControl
Returns
The 'no-cache' cache control directive.
static noTransform()
public static noTransform(): CacheControl
Returns
The 'no-transform' cache control directive.
static proxyRevalidate()
public static proxyRevalidate(): CacheControl
Returns
The 'proxy-revalidate' cache control directive.
static sMaxAge(t)
public static sMaxAge(t: Duration): CacheControl
Parameters
- t
Duration
Returns
The 's-max-age' cache control directive.
static setPrivate()
public static setPrivate(): CacheControl
Returns
The 'private' cache control directive.
static setPublic()
public static setPublic(): CacheControl
Returns
The 'public' cache control directive.