# CfnCachePolicyPropsMixin

A cache policy.

When it's attached to a cache behavior, the cache policy determines the following:

- The values that CloudFront includes in the cache key. These values can include HTTP headers, cookies, and URL query strings. CloudFront uses the cache key to find an object in its cache that it can return to the viewer.
- The default, minimum, and maximum time to live (TTL) values that you want objects to stay in the CloudFront cache.

The headers, cookies, and query strings that are included in the cache key are also included in requests that CloudFront sends to the origin. CloudFront sends a request when it can't find a valid object in its cache that matches the request's cache key. If you want to send values to the origin but *not* include them in the cache key, use `OriginRequestPolicy` .

Extends: [Mixin](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.Mixin.html) › CfnCachePolicyPropsMixin
Implements: [IMixin](https://docs.aws.amazon.com/cdk/api/v2/docs/constructs.IMixin.html)

- CloudFormation: [`AWS::CloudFront::CachePolicy`](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-resource-cloudfront-cachepolicy.html)
- Source: Generated at build time
- Type last changed: v2.269.0 · 16 Sep 2026

## Initializer

TypeScript:

```ts
new CfnCachePolicyPropsMixin(props: CfnCachePolicyMixinProps, options?: CfnPropertyMixinOptions)
```

Python:

```python
CfnCachePolicyPropsMixin(props: CfnCachePolicyMixinProps, options: typing.Optional[CfnPropertyMixinOptions] = None)
```

Java:

```java
new CfnCachePolicyPropsMixin(CfnCachePolicyMixinProps props, CfnPropertyMixinOptions options)
```

C# / .NET:

```csharp
new CfnCachePolicyPropsMixin(CfnCachePolicyMixinProps props, CfnPropertyMixinOptions? options = null)
```

Golang:

```go
NewCfnCachePolicyPropsMixin(Props CfnCachePolicyMixinProps, Options CfnPropertyMixinOptions)
```

## Methods

- `applyTo(construct: IConstruct): void` — Apply the mixin properties to the construct.

- `isMixin(x: any): boolean` (static) — Checks if `x` is a Mixin.

  **Parameters**

  - `x` — Any object.

  **Returns:** true if `x` is an object created from a class which extends `Mixin`.

- `supports(construct: IConstruct): boolean` — Check if this mixin supports the given construct.
