@Stability(value=Stable)
public static interface CfnDistribution.CacheBehaviorPerPathProperty
extends software.amazon.jsii.JsiiSerializable
Use a per-path cache behavior to override the default cache behavior of a distribution, or to add an exception to it. For example, if you set the CacheBehavior to cache , you can use a per-path cache behavior to specify a directory, file, or file type that your distribution will cache. If you don’t want your distribution to cache a specified directory, file, or file type, set the per-path cache behavior to dont-cache .
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.lightsail.*;
CacheBehaviorPerPathProperty cacheBehaviorPerPathProperty = CacheBehaviorPerPathProperty.builder()
.behavior("behavior")
.path("path")
.build();
| Modifier and Type | Interface and Description |
|---|---|
static class |
CfnDistribution.CacheBehaviorPerPathProperty.Builder
A builder for
CfnDistribution.CacheBehaviorPerPathProperty |
static class |
CfnDistribution.CacheBehaviorPerPathProperty.Jsii$Proxy
An implementation for
CfnDistribution.CacheBehaviorPerPathProperty |
| Modifier and Type | Method and Description |
|---|---|
static CfnDistribution.CacheBehaviorPerPathProperty.Builder |
builder() |
default String |
getBehavior()
The cache behavior for the specified path.
|
default String |
getPath()
The path to a directory or file to cache, or not cache.
|
@Stability(value=Stable) @Nullable default String getBehavior()
You can specify one of the following per-path cache behaviors:
cache - This behavior caches the specified path.dont-cache - This behavior doesn't cache the specified path.@Stability(value=Stable) @Nullable default String getPath()
Use an asterisk symbol to specify wildcard directories ( path/to/assets/* ), and file types ( *.html , *jpg , *js ). Directories and file paths are case-sensitive.
Examples:
var/www/html/
var/www/html/index.html
var/www/html/*.html
var/www/html/images/*.jpg
var/www/html/images/*.png
var/www/html/images/*.gif
Specify the following to cache all files in the images subdirectory of the document root of an Apache web server.
var/www/html/images/
@Stability(value=Stable) static CfnDistribution.CacheBehaviorPerPathProperty.Builder builder()
Copyright © 2022. All rights reserved.