Class: Google::Apis::ComputeV1::CacheKeyPolicy
- Inherits:
-
Object
- Object
- Google::Apis::ComputeV1::CacheKeyPolicy
- 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 Cloud CDN.
Instance Attribute Summary collapse
-
#include_host ⇒ Boolean
(also: #include_host?)
If true, requests to different hosts will be cached separately.
-
#include_http_headers ⇒ Array<String>
Allows HTTP request headers (by name) to be used in the cache key.
-
#include_named_cookies ⇒ Array<String>
Allows HTTP cookies (by name) to be used in the cache key.
-
#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 query_string_whitelist and query_string_blacklist.
-
#query_string_blacklist ⇒ Array<String>
Names of query string parameters to exclude in cache keys.
-
#query_string_whitelist ⇒ Array<String>
Names of query string parameters to include in cache keys.
Instance Method Summary collapse
-
#initialize(**args) ⇒ CacheKeyPolicy
constructor
A new instance of CacheKeyPolicy.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ CacheKeyPolicy
Returns a new instance of CacheKeyPolicy.
7336 7337 7338 |
# File 'lib/google/apis/compute_v1/classes.rb', line 7336 def initialize(**args) update!(**args) end |
Instance Attribute Details
#include_host ⇒ Boolean Also known as: include_host?
If true, requests to different hosts will be cached separately.
Corresponds to the JSON property includeHost
7291 7292 7293 |
# File 'lib/google/apis/compute_v1/classes.rb', line 7291 def include_host @include_host end |
#include_http_headers ⇒ Array<String>
Allows HTTP request headers (by name) to be used in the cache key.
Corresponds to the JSON property includeHttpHeaders
7297 7298 7299 |
# File 'lib/google/apis/compute_v1/classes.rb', line 7297 def include_http_headers @include_http_headers end |
#include_named_cookies ⇒ 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.
Corresponds to the JSON property includeNamedCookies
7303 7304 7305 |
# File 'lib/google/apis/compute_v1/classes.rb', line 7303 def @include_named_cookies end |
#include_protocol ⇒ Boolean Also known as: include_protocol?
If true, http and https requests will be cached separately.
Corresponds to the JSON property includeProtocol
7308 7309 7310 |
# File 'lib/google/apis/compute_v1/classes.rb', line 7308 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
query_string_whitelist and query_string_blacklist. If neither is set, the
entire query string will be included. If false, the query string will be
excluded from the cache key entirely.
Corresponds to the JSON property includeQueryString
7317 7318 7319 |
# File 'lib/google/apis/compute_v1/classes.rb', line 7317 def include_query_string @include_query_string end |
#query_string_blacklist ⇒ Array<String>
Names of query string parameters to exclude in cache keys. All other
parameters will be included. Either specify query_string_whitelist or
query_string_blacklist, not both. '&' and '=' will be percent encoded and
not treated as delimiters.
Corresponds to the JSON property queryStringBlacklist
7326 7327 7328 |
# File 'lib/google/apis/compute_v1/classes.rb', line 7326 def query_string_blacklist @query_string_blacklist end |
#query_string_whitelist ⇒ Array<String>
Names of query string parameters to include in cache keys. All other
parameters will be excluded. Either specify query_string_whitelist or
query_string_blacklist, not both. '&' and '=' will be percent encoded and
not treated as delimiters.
Corresponds to the JSON property queryStringWhitelist
7334 7335 7336 |
# File 'lib/google/apis/compute_v1/classes.rb', line 7334 def query_string_whitelist @query_string_whitelist end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
7341 7342 7343 7344 7345 7346 7347 7348 7349 |
# File 'lib/google/apis/compute_v1/classes.rb', line 7341 def update!(**args) @include_host = args[:include_host] if args.key?(:include_host) @include_http_headers = args[:include_http_headers] if args.key?(:include_http_headers) @include_named_cookies = args[:include_named_cookies] if args.key?(:include_named_cookies) @include_protocol = args[:include_protocol] if args.key?(:include_protocol) @include_query_string = args[:include_query_string] if args.key?(:include_query_string) @query_string_blacklist = args[:query_string_blacklist] if args.key?(:query_string_blacklist) @query_string_whitelist = args[:query_string_whitelist] if args.key?(:query_string_whitelist) end |