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 default cache behavior of an Amazon Lightsail content delivery network (CDN) distribution.

Inheritance Hierarchy

System.Object
  Amazon.Lightsail.Model.CacheBehavior

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

Syntax

C#
public class CacheBehavior

The CacheBehavior type exposes the following members

Constructors

NameDescription
Public Method CacheBehavior()

Properties

NameTypeDescription
Public Property Behavior Amazon.Lightsail.BehaviorEnum

Gets and sets the property Behavior.

The cache behavior of the distribution.

The following cache behaviors can be specified:

  • cache - This option is best for static sites. When specified, your distribution caches and serves your entire website as static content. This behavior is ideal for websites with static content that doesn't change depending on who views it, or for websites that don't use cookies, headers, or query strings to personalize content.

  • dont-cache - This option is best for sites that serve a mix of static and dynamic content. When specified, your distribution caches and serve only the content that is specified in the distribution's CacheBehaviorPerPath parameter. This behavior is ideal for websites or web applications that use cookies, headers, and query strings to personalize content for individual users.

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