aws-cdk-lib.aws_appsync.CachingConfig

interface CachingConfig

LanguageType name
.NETAmazon.CDK.AWS.AppSync.CachingConfig
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsappsync#CachingConfig
Javasoftware.amazon.awscdk.services.appsync.CachingConfig
Pythonaws_cdk.aws_appsync.CachingConfig
TypeScript (source)aws-cdk-lib » aws_appsync » CachingConfig

CachingConfig for AppSync resolvers.

Example

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as cdk from 'aws-cdk-lib';
import { aws_appsync as appsync } from 'aws-cdk-lib';
const cachingConfig: appsync.CachingConfig = {
  ttl: cdk.Duration.minutes(30),

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

Properties

NameTypeDescription
ttlDurationThe TTL in seconds for a resolver that has caching enabled.
cachingKeys?string[]The caching keys for a resolver that has caching enabled.

ttl

Type: Duration

The TTL in seconds for a resolver that has caching enabled.

Valid values are between 1 and 3600 seconds.


cachingKeys?

Type: string[] (optional, default: No caching keys)

The caching keys for a resolver that has caching enabled.

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