GradientEdge CDK Utils
    Preparing search index...

    Interface SiteWithLambdaBackendCachePolicyProps

    interface SiteWithLambdaBackendCachePolicyProps {
        cachePolicyName?: string;
        comment?: string;
        cookieBehavior?: CacheCookieBehavior;
        defaultTtl?: Duration;
        defaultTtlInSeconds: number;
        enableAcceptEncodingBrotli?: boolean;
        enableAcceptEncodingGzip?: boolean;
        headerBehavior?: CacheHeaderBehavior;
        maxTtl?: Duration;
        maxTtlInSeconds: number;
        minTtl?: Duration;
        minTtlInSeconds: number;
        queryStringBehavior?: CacheQueryStringBehavior;
    }

    Hierarchy

    • CachePolicyProps
      • SiteWithLambdaBackendCachePolicyProps
    Index

    Properties

    cachePolicyName?: string

    A unique name to identify the cache policy. The name must only include '-', '_', or alphanumeric characters.

    • generated from the id
    comment?: string

    A comment to describe the cache policy.

    The comment cannot be longer than 128 characters.

    - no comment
    
    cookieBehavior?: CacheCookieBehavior

    Determines whether any cookies in viewer requests are included in the cache key and automatically included in requests that CloudFront sends to the origin.

    CacheCookieBehavior.none()
    
    defaultTtl?: Duration

    The default amount of time for objects to stay in the CloudFront cache. Only used when the origin does not send Cache-Control or Expires headers with the object.

    • The greater of 1 day and minTtl
    defaultTtlInSeconds: number
    enableAcceptEncodingBrotli?: boolean

    Whether to normalize and include the Accept-Encoding header in the cache key when the Accept-Encoding header is 'br'.

    false
    
    enableAcceptEncodingGzip?: boolean

    Whether to normalize and include the Accept-Encoding header in the cache key when the Accept-Encoding header is 'gzip'.

    false
    
    headerBehavior?: CacheHeaderBehavior

    Determines whether any HTTP headers are included in the cache key and automatically included in requests that CloudFront sends to the origin.

    CacheHeaderBehavior.none()
    
    maxTtl?: Duration

    The maximum amount of time for objects to stay in the CloudFront cache. CloudFront uses this value only when the origin sends Cache-Control or Expires headers with the object.

    • The greater of 1 year and defaultTtl
    maxTtlInSeconds: number
    minTtl?: Duration

    The minimum amount of time for objects to stay in the CloudFront cache.

    Duration.seconds(0)
    
    minTtlInSeconds: number
    queryStringBehavior?: CacheQueryStringBehavior

    Determines whether any query strings are included in the cache key and automatically included in requests that CloudFront sends to the origin.

    CacheQueryStringBehavior.none()