# 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 `S3DeployActionProps.cacheControl` property.

- Source: [`aws-codepipeline-actions/lib/s3/deploy-action.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/aws-codepipeline-actions/lib/s3/deploy-action.ts#L21)
- Type last changed: v2.118.0 · 3 Jan 2024

## Example

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_codepipeline_actions as codepipeline_actions } from 'aws-cdk-lib';
const cacheControl = codepipeline_actions.CacheControl.fromString('s');
```

## Properties

- `value`: string — the actual text value of the created directive.

## Methods

- `fromString(s: string): CacheControl // chainable` (static) — Allows you to create an arbitrary cache control directive, in case our support is missing a method for a particular directive.

- `immutable(): CacheControl // chainable` (static) — The 'immutable' cache control directive.

- `maxAge(t: Duration): CacheControl // chainable` (static) — The 'max-age' cache control directive.

- `mustRevalidate(): CacheControl // chainable` (static) — The 'must-revalidate' cache control directive.

- `mustUnderstand(): CacheControl // chainable` (static) — The 'must-understand' cache control directive.

- `noCache(): CacheControl // chainable` (static) — The 'no-cache' cache control directive.

- `noStore(): CacheControl // chainable` (static) — The 'no-store' cache control directive.

- `noTransform(): CacheControl // chainable` (static) — The 'no-transform' cache control directive.

- `proxyRevalidate(): CacheControl // chainable` (static) — The 'proxy-revalidate' cache control directive.

- `setPrivate(): CacheControl // chainable` (static) — The 'private' cache control directive.

- `setPublic(): CacheControl // chainable` (static) — The 'public' cache control directive.

- `sMaxAge(t: Duration): CacheControl // chainable` (static) — The 's-max-age' cache control directive.

- `staleIfError(t: Duration): CacheControl // chainable` (static) — The 'stale-if-error' cache control directive.

- `staleWhileRevalidate(t: Duration): CacheControl // chainable` (static) — The 'stale-while-revalidate' cache control directive.
