Class: Google::Apis::ComputeBeta::CachePolicyCacheKeyPolicy

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
lib/google/apis/compute_beta/classes.rb,
lib/google/apis/compute_beta/representations.rb,
lib/google/apis/compute_beta/representations.rb

Overview

Message containing what to include in the cache key for a request for Cache Policy defined on Route Action.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ CachePolicyCacheKeyPolicy

Returns a new instance of CachePolicyCacheKeyPolicy.



7765
7766
7767
# File 'lib/google/apis/compute_beta/classes.rb', line 7765

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#excluded_query_parametersArray<String>

Names of query string parameters to exclude in cache keys. All other parameters will be included. Either specify excluded_query_parameters or included_query_parameters, not both. '&' and '=' will be percent encoded and not treated as delimiters. Note: This field applies to routes that use backend services. Attempting to set it on a route that points exclusively to Backend Buckets will result in a configuration error. For routes that point to a Backend Bucket, use includedQueryParameters to define which parameters should be a part of the cache key. Corresponds to the JSON property excludedQueryParameters

Returns:

  • (Array<String>)


7703
7704
7705
# File 'lib/google/apis/compute_beta/classes.rb', line 7703

def excluded_query_parameters
  @excluded_query_parameters
end

#include_hostBoolean Also known as: include_host?

If true, requests to different hosts will be cached separately. Note: This setting is only applicable to routes that use a Backend Service. It does not affect requests served by a Backend Bucket, as the host is never included in a Backend Bucket's cache key. Attempting to set it on a route that points exclusively to Backend Buckets will result in a configuration error. Corresponds to the JSON property includeHost

Returns:

  • (Boolean)


7713
7714
7715
# File 'lib/google/apis/compute_beta/classes.rb', line 7713

def include_host
  @include_host
end

#include_protocolBoolean Also known as: include_protocol?

If true, http and https requests will be cached separately. Note: This setting is only applicable to routes that use a Backend Service. It does not affect requests served by a Backend Bucket, as the protocol is never included in a Backend Bucket's cache key. Attempting to set on a route that points exclusively to Backend Buckets will result in a configuration error. Corresponds to the JSON property includeProtocol

Returns:

  • (Boolean)


7724
7725
7726
# File 'lib/google/apis/compute_beta/classes.rb', line 7724

def include_protocol
  @include_protocol
end

#include_query_stringBoolean Also known as: include_query_string?

If true, include query string parameters in the cache key according to included_query_parameters and excluded_query_parameters. If neither is set, the entire query string will be included. If false, the query string will be excluded from the cache key entirely. Note: This field applies to routes that use backend services. Attempting to set it on a route that points exclusively to Backend Buckets will result in a configuration error. For routes that point to a Backend Bucket, use includedQueryParameters to define which parameters should be a part of the cache key. Corresponds to the JSON property includeQueryString

Returns:

  • (Boolean)


7738
7739
7740
# File 'lib/google/apis/compute_beta/classes.rb', line 7738

def include_query_string
  @include_query_string
end

Allows HTTP cookies (by name) to be used in the cache key. The name=value pair will be used in the cache key Cloud CDN generates. Note: This setting is only applicable to routes that use a Backend Service. It does not affect requests served by a Backend Bucket. Attempting to set it on a route that points exclusively to Backend Buckets will result in a configuration error. Up to 5 cookie names can be specified. Corresponds to the JSON property includedCookieNames

Returns:

  • (Array<String>)


7750
7751
7752
# File 'lib/google/apis/compute_beta/classes.rb', line 7750

def included_cookie_names
  @included_cookie_names
end

#included_header_namesArray<String>

Allows HTTP request headers (by name) to be used in the cache key. Corresponds to the JSON property includedHeaderNames

Returns:

  • (Array<String>)


7755
7756
7757
# File 'lib/google/apis/compute_beta/classes.rb', line 7755

def included_header_names
  @included_header_names
end

#included_query_parametersArray<String>

Names of query string parameters to include in cache keys. All other parameters will be excluded. Either specify included_query_parameters or excluded_query_parameters, not both. '&' and '=' will be percent encoded and not treated as delimiters. Corresponds to the JSON property includedQueryParameters

Returns:

  • (Array<String>)


7763
7764
7765
# File 'lib/google/apis/compute_beta/classes.rb', line 7763

def included_query_parameters
  @included_query_parameters
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



7770
7771
7772
7773
7774
7775
7776
7777
7778
# File 'lib/google/apis/compute_beta/classes.rb', line 7770

def update!(**args)
  @excluded_query_parameters = args[:excluded_query_parameters] if args.key?(:excluded_query_parameters)
  @include_host = args[:include_host] if args.key?(:include_host)
  @include_protocol = args[:include_protocol] if args.key?(:include_protocol)
  @include_query_string = args[:include_query_string] if args.key?(:include_query_string)
  @included_cookie_names = args[:included_cookie_names] if args.key?(:included_cookie_names)
  @included_header_names = args[:included_header_names] if args.key?(:included_header_names)
  @included_query_parameters = args[:included_query_parameters] if args.key?(:included_query_parameters)
end