Skip to content
v2.275.0

CachingConfig Struct ​

CachingConfig for AppSync resolvers.

Example ​

ts
// 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 ​

cachingKeysoptionalstring[]caching_keysoptionaltyping.List[str]cachingKeysoptionalList<String>CachingKeysoptionalstring[]CachingKeysoptional*[]*string#
The caching keys for a resolver that has caching enabled.

Default: No caching keys

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

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

Valid values are between 1 and 3600 seconds.