AWS SDK Version 3 for .NET
API Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Describes the cache settings of an Amazon Lightsail content delivery network (CDN) distribution.

These settings apply only to your distribution's cacheBehaviors (including the defaultCacheBehavior) that have a behavior of cache.

Inheritance Hierarchy

System.Object
  Amazon.Lightsail.Model.CacheSettings

Namespace: Amazon.Lightsail.Model
Assembly: AWSSDK.Lightsail.dll
Version: 3.x.y.z

Syntax

C#
public class CacheSettings

The CacheSettings type exposes the following members

Constructors

NameDescription
Public Method CacheSettings()

Properties

NameTypeDescription
Public Property AllowedHTTPMethods System.String

Gets and sets the property AllowedHTTPMethods.

The HTTP methods that are processed and forwarded to the distribution's origin.

You can specify the following options:

  • GET,HEAD - The distribution forwards the GET and HEAD methods.

  • GET,HEAD,OPTIONS - The distribution forwards the GET, HEAD, and OPTIONS methods.

  • GET,HEAD,OPTIONS,PUT,PATCH,POST,DELETE - The distribution forwards the GET, HEAD, OPTIONS, PUT, PATCH, POST, and DELETE methods.

If you specify the third option, you might need to restrict access to your distribution's origin so users can't perform operations that you don't want them to. For example, you might not want users to have permission to delete objects from your origin.

Public Property CachedHTTPMethods System.String

Gets and sets the property CachedHTTPMethods.

The HTTP method responses that are cached by your distribution.

You can specify the following options:

  • GET,HEAD - The distribution caches responses to the GET and HEAD methods.

  • GET,HEAD,OPTIONS - The distribution caches responses to the GET, HEAD, and OPTIONS methods.

Public Property DefaultTTL System.Int64

Gets and sets the property DefaultTTL.

The default amount of time that objects stay in the distribution's cache before the distribution forwards another request to the origin to determine whether the content has been updated.

The value specified applies only when the origin does not add HTTP headers such as Cache-Control max-age, Cache-Control s-maxage, and Expires to objects.

Public Property ForwardedCookies Amazon.Lightsail.Model.CookieObject

Gets and sets the property ForwardedCookies.

An object that describes the cookies that are forwarded to the origin. Your content is cached based on the cookies that are forwarded.

Public Property ForwardedHeaders Amazon.Lightsail.Model.HeaderObject

Gets and sets the property ForwardedHeaders.

An object that describes the headers that are forwarded to the origin. Your content is cached based on the headers that are forwarded.

Public Property ForwardedQueryStrings Amazon.Lightsail.Model.QueryStringObject

Gets and sets the property ForwardedQueryStrings.

An object that describes the query strings that are forwarded to the origin. Your content is cached based on the query strings that are forwarded.

Public Property MaximumTTL System.Int64

Gets and sets the property MaximumTTL.

The maximum amount of time that objects stay in the distribution's cache before the distribution forwards another request to the origin to determine whether the object has been updated.

The value specified applies only when the origin adds HTTP headers such as Cache-Control max-age, Cache-Control s-maxage, and Expires to objects.

Public Property MinimumTTL System.Int64

Gets and sets the property MinimumTTL.

The minimum amount of time that objects stay in the distribution's cache before the distribution forwards another request to the origin to determine whether the object has been updated.

A value of 0 must be specified for minimumTTL if the distribution is configured to forward all headers to the origin.

Version Information

.NET Core App:
Supported in: 3.1

.NET Standard:
Supported in: 2.0

.NET Framework:
Supported in: 4.5, 4.0, 3.5