Class: Google::Apis::ComputeV1::CachePolicyCacheKeyPolicy
- Inherits:
-
Object
- Object
- Google::Apis::ComputeV1::CachePolicyCacheKeyPolicy
- Includes:
- Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
- Defined in:
- lib/google/apis/compute_v1/classes.rb,
lib/google/apis/compute_v1/representations.rb,
lib/google/apis/compute_v1/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
-
#excluded_query_parameters ⇒ Array<String>
Names of query string parameters to exclude in cache keys.
-
#include_host ⇒ Boolean
(also: #include_host?)
If true, requests to different hosts will be cached separately.
-
#include_protocol ⇒ Boolean
(also: #include_protocol?)
If true, http and https requests will be cached separately.
-
#include_query_string ⇒ Boolean
(also: #include_query_string?)
If true, include query string parameters in the cache key according to
includedQueryParametersandexcludedQueryParameters. -
#included_cookie_names ⇒ Array<String>
Allows HTTP cookies (by name) to be used in the cache key.
-
#included_header_names ⇒ Array<String>
Allows HTTP request headers (by name) to be used in the cache key.
-
#included_query_parameters ⇒ Array<String>
Names of query string parameters to include in cache keys.
Instance Method Summary collapse
-
#initialize(**args) ⇒ CachePolicyCacheKeyPolicy
constructor
A new instance of CachePolicyCacheKeyPolicy.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ CachePolicyCacheKeyPolicy
Returns a new instance of CachePolicyCacheKeyPolicy.
7557 7558 7559 |
# File 'lib/google/apis/compute_v1/classes.rb', line 7557 def initialize(**args) update!(**args) end |
Instance Attribute Details
#excluded_query_parameters ⇒ Array<String>
Names of query string parameters to exclude in cache keys. All other
parameters will be included. Either specify excludedQueryParameters
or includedQueryParameters, 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 part of the cache key.
Corresponds to the JSON property excludedQueryParameters
7495 7496 7497 |
# File 'lib/google/apis/compute_v1/classes.rb', line 7495 def excluded_query_parameters @excluded_query_parameters end |
#include_host ⇒ Boolean 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
7505 7506 7507 |
# File 'lib/google/apis/compute_v1/classes.rb', line 7505 def include_host @include_host end |
#include_protocol ⇒ Boolean 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
7516 7517 7518 |
# File 'lib/google/apis/compute_v1/classes.rb', line 7516 def include_protocol @include_protocol end |
#include_query_string ⇒ Boolean Also known as: include_query_string?
If true, include query string parameters in the cache key according to
includedQueryParameters and excludedQueryParameters. 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 part of the cache key.
Corresponds to the JSON property includeQueryString
7530 7531 7532 |
# File 'lib/google/apis/compute_v1/classes.rb', line 7530 def include_query_string @include_query_string end |
#included_cookie_names ⇒ Array<String>
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
7542 7543 7544 |
# File 'lib/google/apis/compute_v1/classes.rb', line 7542 def @included_cookie_names end |
#included_header_names ⇒ Array<String>
Allows HTTP request headers (by name) to be used in the cache key.
Corresponds to the JSON property includedHeaderNames
7547 7548 7549 |
# File 'lib/google/apis/compute_v1/classes.rb', line 7547 def included_header_names @included_header_names end |
#included_query_parameters ⇒ Array<String>
Names of query string parameters to include in cache keys. All other
parameters will be excluded. Either specify includedQueryParameters
or excludedQueryParameters, not both. '&' and '=' will be percent
encoded and not treated as delimiters.
Corresponds to the JSON property includedQueryParameters
7555 7556 7557 |
# File 'lib/google/apis/compute_v1/classes.rb', line 7555 def included_query_parameters @included_query_parameters end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
7562 7563 7564 7565 7566 7567 7568 7569 7570 |
# File 'lib/google/apis/compute_v1/classes.rb', line 7562 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 |