# CachingConfigProperty

The caching configuration for a resolver that has caching activated.

- Source: Generated at build time
- Type last changed: v2.93.0 · 23 Aug 2023

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_appsync as appsync } from 'aws-cdk-lib';
const cachingConfigProperty: appsync.CfnResolver.CachingConfigProperty = {
  ttl: 123,

  // the properties below are optional
  cachingKeys: ['cachingKeys'],
};
```

Python:

```python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_appsync as appsync

caching_config_property = appsync.CfnResolver.CachingConfigProperty(
    ttl=123,

    # the properties below are optional
    caching_keys=["cachingKeys"]
)
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.appsync.*;

CachingConfigProperty cachingConfigProperty = CachingConfigProperty.builder()
        .ttl(123)

        // the properties below are optional
        .cachingKeys(List.of("cachingKeys"))
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.AppSync;

var cachingConfigProperty = new CachingConfigProperty {
    Ttl = 123,

    // the properties below are optional
    CachingKeys = new [] { "cachingKeys" }
};
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cachingConfigProperty := &CachingConfigProperty{
	Ttl: jsii.Number(123),

	// the properties below are optional
	CachingKeys: []*string{
		jsii.String("cachingKeys"),
	},
}
```

## Properties

- `cachingKeys`: string[] — The caching keys for a resolver that has caching activated.

  Valid values are entries from the `$context.arguments` , `$context.source` , and `$context.identity` maps.

- `ttl`: number (required) — The TTL in seconds for a resolver that has caching activated.

  Valid values are 1–3,600 seconds.
