Class: Google::Apis::ComputeV1::CacheKeyPolicy

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
generated/google/apis/compute_v1/classes.rb,
generated/google/apis/compute_v1/representations.rb,
generated/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

Instance Method Summary collapse

Methods included from Google::Apis::Core::JsonObjectSupport

#to_json

Methods included from Google::Apis::Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ CacheKeyPolicy

Returns a new instance of CacheKeyPolicy



2996
2997
2998
# File 'generated/google/apis/compute_v1/classes.rb', line 2996

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

Instance Attribute Details

#include_hostBoolean Also known as: include_host?

If true, requests to different hosts will be cached separately. Corresponds to the JSON property includeHost

Returns:

  • (Boolean)


2962
2963
2964
# File 'generated/google/apis/compute_v1/classes.rb', line 2962

def include_host
  @include_host
end

#include_protocolBoolean Also known as: include_protocol?

If true, http and https requests will be cached separately. Corresponds to the JSON property includeProtocol

Returns:

  • (Boolean)


2968
2969
2970
# File 'generated/google/apis/compute_v1/classes.rb', line 2968

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 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

Returns:

  • (Boolean)


2977
2978
2979
# File 'generated/google/apis/compute_v1/classes.rb', line 2977

def include_query_string
  @include_query_string
end

#query_string_blacklistArray<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

Returns:

  • (Array<String>)


2986
2987
2988
# File 'generated/google/apis/compute_v1/classes.rb', line 2986

def query_string_blacklist
  @query_string_blacklist
end

#query_string_whitelistArray<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

Returns:

  • (Array<String>)


2994
2995
2996
# File 'generated/google/apis/compute_v1/classes.rb', line 2994

def query_string_whitelist
  @query_string_whitelist
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3001
3002
3003
3004
3005
3006
3007
# File 'generated/google/apis/compute_v1/classes.rb', line 3001

def update!(**args)
  @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)
  @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